Commit 3ad4b051 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'regulator/fix/core' into regulator-linus

parents 16830985 fa731ac7
...@@ -138,18 +138,10 @@ static bool have_full_constraints(void) ...@@ -138,18 +138,10 @@ static bool have_full_constraints(void)
*/ */
static void regulator_lock_supply(struct regulator_dev *rdev) static void regulator_lock_supply(struct regulator_dev *rdev)
{ {
struct regulator *supply; int i;
int i = 0;
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);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment