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: 60ab7f4153 ("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>
This commit is contained in:
Matti Vaittinen 2020-06-12 12:23:17 +03:00 committed by Mark Brown
parent d7442ba13d
commit 92919679d3
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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);