diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-12-04 15:01:02 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-02-24 14:37:14 -0500 |
commit | 5f56a8e6efb695b6ea7b56e8a33d25ec622e77bd (patch) | |
tree | 3f5acfd00b084f78d28cbfa2322b91c14db28e14 /drivers/mmc | |
parent | bb691ae464b77d30e74c66480e98d74e88d6b194 (diff) | |
download | op-kernel-dev-5f56a8e6efb695b6ea7b56e8a33d25ec622e77bd.zip op-kernel-dev-5f56a8e6efb695b6ea7b56e8a33d25ec622e77bd.tar.gz |
mmc: use regulator_can_change_voltage() instead of regulator_count_voltages
mmc_regulator_set_ocr() depends on the ability of regulator to change the
voltage value. When regulator cannot change its voltage output, some code
is skipped to avoid reporting false errors on some boards, which use MMC
hosts with fixed regulators (e.g. Samsung Goni and UniversalC210 boards).
This patch replaces a hacky workaround based on regulator_count_voltages()
value with the correct call to recently introduced
regulator_can_change_voltage() function in regulators core.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 6f3bc1a..08a3cf2 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1235,7 +1235,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc, */ voltage = regulator_get_voltage(supply); - if (regulator_count_voltages(supply) == 1) + if (!regulator_can_change_voltage(supply)) min_uV = max_uV = voltage; if (voltage < 0) |