summaryrefslogtreecommitdiff
path: root/drivers/regulator/max8997.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max8997.c')
-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,
rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
/* If the voltage is increasing */
if (org < i)
- udelay(desc->step * (i - org) / max8997->ramp_delay);
+ udelay(DIV_ROUND_UP(desc->step * (i - org),
+ max8997->ramp_delay));
}
return ret;