]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
regulator: Warn when unregistering an in-use regulator
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 21 Jul 2009 15:00:25 +0000 (16:00 +0100)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 22 Sep 2009 12:32:39 +0000 (13:32 +0100)
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>
drivers/regulator/core.c

index e11c2222d9af6f08e1d217e2478bd5eb89cfd00c..79a6910eb894fc4ebe805ba5b4cd1b0d26d89c10 100644 (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)