* (which is safe for MMC, but not in general).
*/
if (regulator_is_enabled(hsmmc[i].vcc) > 0) {
- dev_warn(dev, "APPLY REGULATOR HACK for vmmc\n");
regulator_enable(hsmmc[i].vcc);
regulator_disable(hsmmc[i].vcc);
}
if (hsmmc[i].vcc_aux) {
if (regulator_is_enabled(reg) > 0) {
- dev_warn(dev, "APPLY REGULATOR HACK "
- "for vmmc_aux\n");
regulator_enable(reg);
regulator_disable(reg);
}
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);