]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: arizona: Add missing cleanup on remove
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 26 Mar 2013 12:16:26 +0000 (12:16 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 17 May 2013 15:47:28 +0000 (16:47 +0100)
We'd forgotten to disable /RESET or the regulators. Practically speaking
this code is unlikely to ever be run.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/mfd/arizona-core.c

index 25bfd1ec1a65c0d55835c4358ab4e67e6082a3fb..8002e2d2f6fef82762944ec1aa99d00a23ed4bfd 100644 (file)
@@ -839,6 +839,11 @@ int arizona_dev_exit(struct arizona *arizona)
        arizona_free_irq(arizona, ARIZONA_IRQ_CLKGEN_ERR, arizona);
        pm_runtime_disable(arizona->dev);
        arizona_irq_exit(arizona);
+       if (arizona->pdata.reset)
+               gpio_set_value_cansleep(arizona->pdata.reset, 0);
+       regulator_disable(arizona->dcvdd);
+       regulator_bulk_disable(ARRAY_SIZE(arizona->core_supplies),
+                              arizona->core_supplies);
        return 0;
 }
 EXPORT_SYMBOL_GPL(arizona_dev_exit);