diff options
Diffstat (limited to 'drivers/regulator/88pm8607.c')
-rw-r--r-- | drivers/regulator/88pm8607.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 7d149a8d8d9b..2ce2eb71d0f5 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -215,7 +215,7 @@ static int pm8607_list_voltage(struct regulator_dev *rdev, unsigned index) | |||
215 | struct pm8607_regulator_info *info = rdev_get_drvdata(rdev); | 215 | struct pm8607_regulator_info *info = rdev_get_drvdata(rdev); |
216 | int ret = -EINVAL; | 216 | int ret = -EINVAL; |
217 | 217 | ||
218 | if (info->vol_table && (index < (2 << info->vol_nbits))) { | 218 | if (info->vol_table && (index < (1 << info->vol_nbits))) { |
219 | ret = info->vol_table[index]; | 219 | ret = info->vol_table[index]; |
220 | if (info->slope_double) | 220 | if (info->slope_double) |
221 | ret <<= 1; | 221 | ret <<= 1; |
@@ -233,7 +233,7 @@ static int choose_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) | |||
233 | max_uV = max_uV >> 1; | 233 | max_uV = max_uV >> 1; |
234 | } | 234 | } |
235 | if (info->vol_table) { | 235 | if (info->vol_table) { |
236 | for (i = 0; i < (2 << info->vol_nbits); i++) { | 236 | for (i = 0; i < (1 << info->vol_nbits); i++) { |
237 | if (!info->vol_table[i]) | 237 | if (!info->vol_table[i]) |
238 | break; | 238 | break; |
239 | if ((min_uV <= info->vol_table[i]) | 239 | if ((min_uV <= info->vol_table[i]) |