Skip to content

Commit

Permalink
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Jan 12, 2016
2 parents 1683098 + fa731ac commit 3ad4b05
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

while (1) {
mutex_lock_nested(&rdev->mutex, i++);
supply = rdev->supply;

if (!rdev->supply)
return;
int i;

rdev = supply->rdev;
}
for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++)
mutex_lock_nested(&rdev->mutex, i);
}

/**
Expand Down

0 comments on commit 3ad4b05

Please sign in to comment.