]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: use regulator_can_change_voltage() instead of regulator_count_voltages
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 4 Dec 2012 14:01:02 +0000 (15:01 +0100)
committerChris Ball <cjb@laptop.org>
Sun, 24 Feb 2013 19:37:14 +0000 (14:37 -0500)
commit4fdbd4370d574cd327e0aae3f4c5baf57d7afe80
tree3f5acfd00b084f78d28cbfa2322b91c14db28e14
parentf440d3061c205c41da9994c7ebcaa71921e40f10
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>
drivers/mmc/core/core.c