]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/mmc-twl4030.c
OMAP: mmc_twl4030 nicely disable vmmc_aux
[linux-2.6-omap-h63xx.git] / 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);