Messages in this thread Patch in this message | | | Subject | [PATCH] regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range | From | Axel Lin <> | Date | Sat, 24 May 2014 11:10:43 +0800 |
| |
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> --- drivers/regulator/core.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b97ffd2..7399cbf 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2321,6 +2321,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); -- 1.8.3.2
| |