Skip to content

Commit

Permalink
regulator: core: Use map_voltage_linear_range by default for list_vol…
Browse files Browse the repository at this point in the history
…tage_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>
  • Loading branch information
Axel Lin authored and Mark Brown committed May 26, 2014
1 parent 9f8c0fe commit 3669862
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2322,6 +2322,10 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
regulator_list_voltage_linear)
ret = regulator_map_voltage_linear(rdev,
min_uV, max_uV);
else if (rdev->desc->ops->list_voltage ==
regulator_list_voltage_linear_range)
ret = regulator_map_voltage_linear_range(rdev,
min_uV, max_uV);
else
ret = regulator_map_voltage_iterate(rdev,
min_uV, max_uV);
Expand Down

0 comments on commit 3669862

Please sign in to comment.