summaryrefslogtreecommitdiff
path: root/drivers/regulator/max8998.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max8998.c')
-rw-r--r--drivers/regulator/max8998.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 06be8cc..1f0df40 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -447,7 +447,7 @@ static int max8998_set_voltage_buck_time_sel(struct regulator_dev *rdev,
difference = (new_selector - old_selector) * desc->step / 1000;
if (difference > 0)
- return difference / ((val & 0x0f) + 1);
+ return DIV_ROUND_UP(difference, (val & 0x0f) + 1);
return 0;
}