From 0268abf95f935c2fe45f778b2a223685e68c7823 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Tue, 24 Mar 2009 12:15:54 +0000 Subject: [PATCH] OMAP: mmc_twl4030 nicely disable vmmc_aux 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 Acked-by: David Brownell Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/mmc-twl4030.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index 2ff50f05f49..cb56fe270ab 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c @@ -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); -- 2.41.1