diff options
author | Axel Lin <axel.lin@ingics.com> | 2019-02-21 21:17:22 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-21 18:54:11 +0000 |
commit | bf1fc259e8a40b9eb059a161db0d6d3d6b8c94e4 (patch) | |
tree | f6065ff0687a8e518d278b9d0a51056892efbb3c /drivers/regulator | |
parent | 21687b16248530bec6b950d73a58e4c2eca8e830 (diff) | |
download | linux-bf1fc259e8a40b9eb059a161db0d6d3d6b8c94e4.tar.bz2 |
regulator: s5m8767: Simplify s5m8767_set_voltage_time_sel implementation
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/s5m8767.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 5b0e1fe6723f..bb9d1a083299 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -339,13 +339,9 @@ static int s5m8767_set_voltage_time_sel(struct regulator_dev *rdev, unsigned int new_sel) { struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); - const struct sec_voltage_desc *desc; - int reg_id = rdev_get_id(rdev); - - desc = reg_voltage_map[reg_id]; if ((old_sel < new_sel) && s5m8767->ramp_delay) - return DIV_ROUND_UP(desc->step * (new_sel - old_sel), + return DIV_ROUND_UP(rdev->desc->uV_step * (new_sel - old_sel), s5m8767->ramp_delay * 1000); return 0; } |