mmc: Use regulator framework correctly
PATCH 1/1 mmc: Use regulator framework correctly
Quoted 1 line
From
3f382fcf80afc4f28f471138ceb7b69b4055c9c3Mon Sep 17 00:00:00 2001
From: Adrian Hunter <[email protected]>
Date: Thu, 5 Aug 2010 10:45:24 +0300
Subject: [PATCH] mmc: Use regulator framework correctly
Issues with the regulator framework no longer exist, so regulator_enable() / regulator_disable() should be used correctly.
Signed-off-by Adrian Hunter <[email protected]>
---drivers/mmc/core/core.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
drivers/mmc/core/core.c +0 -0
@@ -784,11 +784,6 @@ int mmc_regulator_set_ocr(struct regulator *supply, unsigned short vdd_bit)
{
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 regulator *supply, unsigned short vdd_bit)
else
result = 0;- if (result == 0 && !enabled)
+ if (result == 0)
result = regulator_enable(supply);
- } else if (enabled) {
+ } else {
result = regulator_disable(supply);
}Signature · 1 line
1.6.3.3