diff options
author | 2025-08-29 07:37:21 -0700 | |
---|---|---|
committer | 2025-08-29 07:37:21 -0700 | |
commit | ec1abfc8333110b9e645cd59eb3bc0541fd5bd2c (patch) | |
tree | acc0a4491eecb77d6376253afaecbf12ea208bc3 | |
parent | Merge tag 'ata-6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux (diff) | |
parent | regulator: pm8008: fix probe failure due to negative voltage selector (diff) | |
download | wireguard-linux-ec1abfc8333110b9e645cd59eb3bc0541fd5bd2c.tar.xz wireguard-linux-ec1abfc8333110b9e645cd59eb3bc0541fd5bd2c.zip |
Merge tag 'regulator-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown:
"One simple fix for the pm8008 driver for poor error handling,
switching to use a helper which does the right thing in the
affected case"
* tag 'regulator-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: pm8008: fix probe failure due to negative voltage selector
-rw-r--r-- | drivers/regulator/qcom-pm8008-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/qcom-pm8008-regulator.c b/drivers/regulator/qcom-pm8008-regulator.c index da017c1969d0..90c78ee1c37b 100644 --- a/drivers/regulator/qcom-pm8008-regulator.c +++ b/drivers/regulator/qcom-pm8008-regulator.c @@ -96,7 +96,7 @@ static int pm8008_regulator_get_voltage_sel(struct regulator_dev *rdev) uV = le16_to_cpu(val) * 1000; - return (uV - preg->desc.min_uV) / preg->desc.uV_step; + return regulator_map_voltage_linear_range(rdev, uV, INT_MAX); } static const struct regulator_ops pm8008_regulator_ops = { |