diff options
-rw-r--r-- | drivers/regulator/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 5751f5ed47c..8918271f9e8 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2047,7 +2047,7 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev, return -EINVAL; } - ret = (min_uV - rdev->desc->min_uV) / rdev->desc->uV_step; + ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); if (ret < 0) return ret; |