diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 782c228a19bd503ccda868ac67f46cce7fbba2e7..411cb12385aa3a5e159df2b0379a2e5685d3d1bf 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -223,7 +223,7 @@ static int wm831x_buckv_map_voltage(struct regulator_dev *rdev, if (min_uV < 600000) vsel = 0; else if (min_uV <= 1800000) - vsel = ((min_uV - 600000) / 12500) + 8; + vsel = DIV_ROUND_UP(min_uV - 600000, 12500) + 8; else return -EINVAL;