From 6bf87d17c9f5b855e9dde7b3d6f726385b966814 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 21 Jul 2009 16:00:25 +0100 Subject: 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 Signed-off-by: Liam Girdwood --- drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e11c2222d9a..79a6910eb89 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(®ulator_list_mutex); + WARN_ON(rdev->open_count); unset_regulator_supplies(rdev); list_del(&rdev->list); if (rdev->supply) -- cgit v1.2.3