Message ID | 201008052132.o75LWlge006062@imap1.linux-foundation.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff -puN drivers/mmc/core/core.c~mmc-use-regulator-framework-correctly drivers/mmc/core/core.c --- a/drivers/mmc/core/core.c~mmc-use-regulator-framework-correctly +++ a/drivers/mmc/core/core.c @@ -784,11 +784,6 @@ int mmc_regulator_set_ocr(struct regulat { int result = 0; int min_uV, max_uV; - int enabled; - - enabled = regulator_is_enabled(supply); - if (enabled < 0) - return enabled; if (vdd_bit) { int tmp; @@ -819,9 +814,9 @@ int mmc_regulator_set_ocr(struct regulat else result = 0; - if (result == 0 && !enabled) + if (result == 0) result = regulator_enable(supply); - } else if (enabled) { + } else { result = regulator_disable(supply); }