diff options
author | Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> | 2020-06-12 11:23:17 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-06-12 15:57:17 +0200 |
commit | 92919679d31721381e3c376488477efe49b915f3 (patch) | |
tree | 138e919cf8016ba10fa590c37b19536fed7c9aca /drivers/regulator/helpers.c | |
parent | regulator: da9063: fix LDO9 suspend and warning. (diff) | |
download | linux-92919679d31721381e3c376488477efe49b915f3.tar.xz linux-92919679d31721381e3c376488477efe49b915f3.zip |
regulator: Fix pickable ranges mapping
Pickable ranges mapping function never used range min selector. Thus
existing drivers broke when proper linear_ranges functionality was taken
in use. Fix this for now just by ignoring the minimum selector.
Fixes: 60ab7f4153b6 ("regulator: use linear_ranges helper")
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20200612090225.GA3243@localhost.localdomain
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/helpers.c')
-rw-r--r-- | drivers/regulator/helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c index e970e9d2f8be..e4bb09bbd3fa 100644 --- a/drivers/regulator/helpers.c +++ b/drivers/regulator/helpers.c @@ -486,7 +486,7 @@ int regulator_map_voltage_pickable_linear_range(struct regulator_dev *rdev, continue; } - ret = selector + sel; + ret = selector + sel - range->min_sel; voltage = rdev->desc->ops->list_voltage(rdev, ret); |