mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
Revert "UPSTREAM: regulator: core: avoid unused variable warning"
This reverts commit40e4c35358. Please refer to commit70a7fb80e8("regulator: core: Fix nested locking of supplies") Change-Id: If0bee255621a7480cfc6fa232f65081c4d904897
This commit is contained in:
committed by
Gerrit Code Review
parent
e18a0d0cd7
commit
e089966464
@@ -138,10 +138,18 @@ static bool have_full_constraints(void)
|
||||
*/
|
||||
static void regulator_lock_supply(struct regulator_dev *rdev)
|
||||
{
|
||||
int i;
|
||||
struct regulator *supply;
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++)
|
||||
mutex_lock_nested(&rdev->mutex, i);
|
||||
while (1) {
|
||||
mutex_lock_nested(&rdev->mutex, i++);
|
||||
supply = rdev->supply;
|
||||
|
||||
if (!rdev->supply)
|
||||
return;
|
||||
|
||||
rdev = supply->rdev;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user