diff mbox

+ mmc-use-regulator-framework-correctly.patch added to -mm tree

Message ID 201008052132.o75LWlge006062@imap1.linux-foundation.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Andrew Morton Aug. 5, 2010, 9:32 p.m. UTC
None
diff mbox

Patch

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);
 	}