summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index de6a643b0689..cb1901495c2d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -287,12 +287,13 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
if (host->vcc_aux && !host->regulator_enabled && !ret) {
ret = regulator_enable(host->vcc_aux);
- if (!ret)
+ if (!ret) {
host->regulator_enabled = 1;
msleep(100);
+ }
}
} else {
- if (host->vcc_aux && regulator_is_enabled(host->vcc_aux) > 0) {
+ if (host->vcc_aux && host->regulator_enabled) {
ret = regulator_disable(host->vcc_aux);
if (!ret)
host->regulator_enabled = 0;