aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/max8997.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index f8940c603cf0..ad6628ca94f4 100644
--- a/drivers/regulator/max8997.c
+++ b/drivers/regulator/max8997.c
@@ -544,7 +544,8 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev,
544 rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) { 544 rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
545 /* If the voltage is increasing */ 545 /* If the voltage is increasing */
546 if (org < i) 546 if (org < i)
547 udelay(desc->step * (i - org) / max8997->ramp_delay); 547 udelay(DIV_ROUND_UP(desc->step * (i - org),
548 max8997->ramp_delay));
548 } 549 }
549 550
550 return ret; 551 return ret;