aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/pv88060-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-03-03 23:49:46 +0000
committerMark Brown <broonie@kernel.org>2019-03-03 23:49:46 +0000
commit1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9 (patch)
tree6d98b9475d43d035f597c4139fdd7587b46fae8e /drivers/regulator/pv88060-regulator.c
parentregulator: max77650: Convert to use regulator_set/get_current_limit_regmap (diff)
parentregulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA (diff)
downloadlinux-dev-1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9.tar.xz
linux-dev-1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9.zip
Merge branch 'for-5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.1
Diffstat (limited to 'drivers/regulator/pv88060-regulator.c')
-rw-r--r--drivers/regulator/pv88060-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/regulator/pv88060-regulator.c
index d5dab9bef378..da6ed723e398 100644
--- a/drivers/regulator/pv88060-regulator.c
+++ b/drivers/regulator/pv88060-regulator.c
@@ -135,7 +135,7 @@ static int pv88060_set_current_limit(struct regulator_dev *rdev, int min,
int i;
/* search for closest to maximum */
- for (i = info->n_current_limits; i >= 0; i--) {
+ for (i = info->n_current_limits - 1; i >= 0; i--) {
if (min <= info->current_limits[i]
&& max >= info->current_limits[i]) {
return regmap_update_bits(rdev->regmap,