Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
This commit is contained in:
commit
3ad4b0517b
|
@ -138,18 +138,10 @@ static bool have_full_constraints(void)
|
|||
*/
|
||||
static void regulator_lock_supply(struct regulator_dev *rdev)
|
||||
{
|
||||
struct regulator *supply;
|
||||
int i = 0;
|
||||
int i;
|
||||
|
||||
while (1) {
|
||||
mutex_lock_nested(&rdev->mutex, i++);
|
||||
supply = rdev->supply;
|
||||
|
||||
if (!rdev->supply)
|
||||
return;
|
||||
|
||||
rdev = supply->rdev;
|
||||
}
|
||||
for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++)
|
||||
mutex_lock_nested(&rdev->mutex, i);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue