Revert "UPSTREAM: regulator: core: avoid unused variable warning"

This reverts commit 40e4c35358.

Please refer to commit 70a7fb80e8
("regulator: core: Fix nested locking of supplies")

Change-Id: If0bee255621a7480cfc6fa232f65081c4d904897
This commit is contained in:
Huang, Tao
2016-03-08 16:13:26 +08:00
committed by Gerrit Code Review
parent e18a0d0cd7
commit e089966464

View File

@@ -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;
}
}
/**