]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP: mmc_twl4030 nicely disable vmmc_aux
authorAdrian Hunter <adrian.hunter@nokia.com>
Tue, 24 Mar 2009 12:15:54 +0000 (12:15 +0000)
committerTony Lindgren <tony@atomide.com>
Wed, 25 Mar 2009 00:29:25 +0000 (17:29 -0700)
The MMC driver turns the power off before it turns it
on. To avoid regulator warnings, vmmc_aux must only be
disabled if it has previously been enabled.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/mmc-twl4030.c

index 2ff50f05f4917bb61d7c80d0ea6494a8e60eaf5a..cb56fe270abd89710375ff77e51a92b24fa3c5d0 100644 (file)
@@ -305,7 +305,7 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
                                ret = mmc_regulator_set_ocr(c->vcc, 0);
                }
        } else {
-               if (c->vcc_aux)
+               if (c->vcc_aux && (ret = regulator_is_enabled(c->vcc_aux)) > 0)
                        ret = regulator_disable(c->vcc_aux);
                if (ret == 0)
                        ret = mmc_regulator_set_ocr(c->vcc, 0);