[PATCH 3/6] regulator: Warn when unregistering an in-use regulator

From: Mark Brown
Date: Tue Jul 21 2009 - 11:01:24 EST


We're probably going to start oopsing fairly soon after this happens.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
drivers/regulator/core.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 33a8c3c..e5ccc9f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2229,6 +2229,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)
--
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/