diff mbox

+ omap_hsmmc-remove-ugly-hack-workaround-regulator-framework-bugs.patch added to -mm tree

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

Commit Message

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

Patch

diff -puN drivers/mmc/host/omap_hsmmc.c~omap_hsmmc-remove-ugly-hack-workaround-regulator-framework-bugs drivers/mmc/host/omap_hsmmc.c
--- a/drivers/mmc/host/omap_hsmmc.c~omap_hsmmc-remove-ugly-hack-workaround-regulator-framework-bugs
+++ a/drivers/mmc/host/omap_hsmmc.c
@@ -401,25 +401,6 @@  static int omap_hsmmc_reg_get(struct oma
 		/* Allow an aux regulator */
 		reg = regulator_get(host->dev, "vmmc_aux");
 		host->vcc_aux = IS_ERR(reg) ? NULL : reg;
-
-		/*
-		* UGLY HACK:  workaround regulator framework bugs.
-		* When the bootloader leaves a supply active, it's
-		* initialized with zero usecount ... and we can't
-		* disable it without first enabling it.  Until the
-		* framework is fixed, we need a workaround like this
-		* (which is safe for MMC, but not in general).
-		*/
-		if (regulator_is_enabled(host->vcc) > 0) {
-			regulator_enable(host->vcc);
-			regulator_disable(host->vcc);
-		}
-		if (host->vcc_aux) {
-			if (regulator_is_enabled(reg) > 0) {
-				regulator_enable(reg);
-				regulator_disable(reg);
-			}
-		}
 	}
 
 	return 0;