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>
This commit is contained in:
Mark Brown 2009-07-21 16:00:25 +01:00 committed by Liam Girdwood
parent a7a1ad9066
commit 6bf87d17c9
1 changed files with 1 additions and 0 deletions

View File

@ -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)