Skip to content

Commit

Permalink
regulator: Warn when unregistering an in-use regulator
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Sep 22, 2009
1 parent a7a1ad9 commit 6bf87d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6bf87d1

Please sign in to comment.