aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-21 16:00:25 +0100
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-09-22 13:32:39 +0100
commit6bf87d17c9f5b855e9dde7b3d6f726385b966814 (patch)
treee1d281d3ba2a032ee4d5f3a26b461abf6f41545b /drivers
parenta7a1ad9066e0266c8a4357ba3dbaeebfb80f531d (diff)
downloadlinaro-lsk-6bf87d17c9f5b855e9dde7b3d6f726385b966814.tar.gz
regulator: Warn when unregistering an in-use regulator
We're probably going to start oopsing fairly soon after this happens. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e11c2222d9a..79a6910eb89 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2253,6 +2253,7 @@ void regulator_unregister(struct regulator_dev *rdev)
return;
mutex_lock(&regulator_list_mutex);
+ WARN_ON(rdev->open_count);
unset_regulator_supplies(rdev);
list_del(&rdev->list);
if (rdev->supply)