projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc9ceed
)
regulator: core: Drop references on supply regulator when unregistering
author
Mark Brown
<broonie@linaro.org>
Mon, 8 Jul 2013 08:14:45 +0000
(09:14 +0100)
committer
Mark Brown
<broonie@linaro.org>
Mon, 15 Jul 2013 10:20:08 +0000
(11:20 +0100)
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index 288c75abc19034c06e62772ea6b6cc62242da473..1510333bcf0dccc1bf780d168de339f2d54a58dc 100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-3740,8
+3740,11
@@
void regulator_unregister(struct regulator_dev *rdev)
if (rdev == NULL)
return;
- if (rdev->supply)
+ if (rdev->supply) {
+ while (rdev->use_count--)
+ regulator_disable(rdev->supply);
regulator_put(rdev->supply);
+ }
mutex_lock(®ulator_list_mutex);
debugfs_remove_recursive(rdev->debugfs);
flush_work(&rdev->disable_work.work);