diff mbox

[2/7] mmc: sdhci: UHS-I should be disabled if vqmmc 1.8v check return error

Message ID 1359536388-7896-3-git-send-email-kliu5@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kevin Liu Jan. 30, 2013, 8:59 a.m. UTC
If vqmmc 1.8v check return error, for example vqmmc is a dummy regulator,
UHS-I mode should also be disabled as return 0.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 664650b..e6da79f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2897,8 +2897,8 @@  int sdhci_add_host(struct sdhci_host *host)
 		}
 	} else {
 		regulator_enable(host->vqmmc);
-		if (!regulator_is_supported_voltage(host->vqmmc, 1700000,
-			1950000))
+		if (regulator_is_supported_voltage(host->vqmmc, 1700000,
+			1950000) <= 0)
 			caps[1] &= ~(SDHCI_SUPPORT_SDR104 |
 					SDHCI_SUPPORT_SDR50 |
 					SDHCI_SUPPORT_DDR50);