aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-21 11:00:25 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-09-22 08:32:39 -0400
commit6bf87d17c9f5b855e9dde7b3d6f726385b966814 (patch)
treee1d281d3ba2a032ee4d5f3a26b461abf6f41545b /drivers/regulator/core.c
parenta7a1ad9066e0266c8a4357ba3dbaeebfb80f531d (diff)
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/regulator/core.c')
-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 e11c2222d9af..79a6910eb894 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2253,6 +2253,7 @@ void regulator_unregister(struct regulator_dev *rdev)
2253 return; 2253 return;
2254 2254
2255 mutex_lock(&regulator_list_mutex); 2255 mutex_lock(&regulator_list_mutex);
2256 WARN_ON(rdev->open_count);
2256 unset_regulator_supplies(rdev); 2257 unset_regulator_supplies(rdev);
2257 list_del(&rdev->list); 2258 list_del(&rdev->list);
2258 if (rdev->supply) 2259 if (rdev->supply)