aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-05-23 23:10:43 -0400
committerMark Brown <broonie@linaro.org>2014-05-26 09:36:55 -0400
commit366986274c548261c42d5ca24391cb4eef3008c2 (patch)
tree4e328756fb2e6220c8f4c1f91caebd543579e475 /drivers/regulator
parent9f8c0fe9542141fd0008d5c0f6ae365890f6da94 (diff)
regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range
Use map_voltage_linear_range() if list_voltage_linear_range() is in use and nothing is set. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index ba28d29b66d2..476661117930 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2322,6 +2322,10 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
2322 regulator_list_voltage_linear) 2322 regulator_list_voltage_linear)
2323 ret = regulator_map_voltage_linear(rdev, 2323 ret = regulator_map_voltage_linear(rdev,
2324 min_uV, max_uV); 2324 min_uV, max_uV);
2325 else if (rdev->desc->ops->list_voltage ==
2326 regulator_list_voltage_linear_range)
2327 ret = regulator_map_voltage_linear_range(rdev,
2328 min_uV, max_uV);
2325 else 2329 else
2326 ret = regulator_map_voltage_iterate(rdev, 2330 ret = regulator_map_voltage_iterate(rdev,
2327 min_uV, max_uV); 2331 min_uV, max_uV);