diff options
-rw-r--r-- | drivers/regulator/da903x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index c9de73098470..aa224d936e0d 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c | |||
@@ -301,7 +301,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev, | |||
301 | } | 301 | } |
302 | 302 | ||
303 | val = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV; | 303 | val = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV; |
304 | val = (val > 7 && val < 20) ? 8 : val - 12; | 304 | val = (val >= 20) ? val - 12 : ((val > 7) ? 8 : val); |
305 | val <<= info->vol_shift; | 305 | val <<= info->vol_shift; |
306 | mask = ((1 << info->vol_nbits) - 1) << info->vol_shift; | 306 | mask = ((1 << info->vol_nbits) - 1) << info->vol_shift; |
307 | 307 | ||