]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Fix the logic of s5m8767_set_voltage_time_sel
authorAxel Lin <axel.lin@gmail.com>
Fri, 24 Feb 2012 06:52:45 +0000 (14:52 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 11 Mar 2012 20:48:45 +0000 (20:48 +0000)
commitccc4b2a648f9935c6d3ed6bc06ec36e445c03007
tree195a191c2a0ea04e17f9b8daff8d5827ed495273
parentc3e9f8b6b99f1b7281bce53d12ac5a15890ccc5b
regulator: Fix the logic of s5m8767_set_voltage_time_sel

This patch includes below fixes:
1. The mask variable is not used at all here, remove it.
2. We already have the new_sel and old_sel, simply returns the delay by:
  DIV_ROUND_UP(desc->step * (new_sel - old_sel), s5m8767->ramp_delay);

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/s5m8767.c