Skip to contentSkip to conversation

mmc: Use regulator framework correctly

PATCH New Adrian Hunter 1 participant 1 message Aug 5, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: Use regulator framework correctly

Quoted 1 line

From 3f382fcf80afc4f28f471138ceb7b69b4055c9c3 Mon 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.

---
drivers/mmc/core/core.c | 9 ++-------

1 files changed, 2 insertions(+), 7 deletions(-)
drivers/mmc/core/core.c +0 -0
index 2cfefa6..da73899 100644
@@ -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