summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
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/regulator
parenta7a1ad9066e0266c8a4357ba3dbaeebfb80f531d (diff)
downloadop-kernel-dev-6bf87d17c9f5b855e9dde7b3d6f726385b966814.zip
op-kernel-dev-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/regulator')
-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 e11c222..79a6910 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)
OpenPOWER on IntegriCloud