projects
/
cascardo
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
1683098
)
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
author
Mark Brown
<broonie@kernel.org>
Tue, 12 Jan 2016 18:26:02 +0000
(18:26 +0000)
committer
Mark Brown
<broonie@kernel.org>
Tue, 12 Jan 2016 18:26:02 +0000
(18:26 +0000)
drivers/regulator/core.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index
73b7683
..
c70017d
100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-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);
}
/**