From af3930dfaab99b219acd575748549069636bcbac Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Wed, 19 Sep 2012 22:27:04 +0800 Subject: [PATCH] --- yaml --- r: 332850 b: refs/heads/master c: 9cde5b7a49a88939d648c361ec938fa8a633a045 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mmc/core/core.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 8a792adf7f43..6079e0c4e9e7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4f24ade1b24ec09981b5506e3a9a19a96055435 +refs/heads/master: 9cde5b7a49a88939d648c361ec938fa8a633a045 diff --git a/trunk/drivers/mmc/core/core.c b/trunk/drivers/mmc/core/core.c index 044cd016320e..66121633c9cd 100644 --- a/trunk/drivers/mmc/core/core.c +++ b/trunk/drivers/mmc/core/core.c @@ -1113,7 +1113,8 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc, int tmp; int voltage; - /* REVISIT mmc_vddrange_to_ocrmask() may have set some + /* + * REVISIT mmc_vddrange_to_ocrmask() may have set some * bits this regulator doesn't quite support ... don't * be too picky, most cards and regulators are OK with * a 0.1V range goof (it's a small error percentage). @@ -1127,12 +1128,13 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc, max_uV = min_uV + 100 * 1000; } - /* avoid needless changes to this voltage; the regulator - * might not allow this operation + /* + * If we're using a fixed/static regulator, don't call + * regulator_set_voltage; it would fail. */ voltage = regulator_get_voltage(supply); - if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE) + if (regulator_count_voltages(supply) == 1) min_uV = max_uV = voltage; if (voltage < 0)