regulator: wm831x-isink: Fix the logic to choose best current limit setting
commited3be9a0e3c1050fe07d69a8c600d86cac76cdc4
authorAxel Lin <axel.lin@gmail.com>
Tue, 27 Mar 2012 07:18:53 +0000 (27 15:18 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 28 Mar 2012 11:44:07 +0000 (28 12:44 +0100)
tree0c505e677af6570402c1a7ab067f571dba415c74
parenta171e782a97d4ba55d7fa02f9a46904288b2c229
regulator: wm831x-isink: Fix the logic to choose best current limit setting

Current code in wm831x_isink_set_current actually set the current limit setting
smaller than specified range.

Fix the logic in wm831x_isink_set_current to choose the smallest current limit
setting falls within the specified range.

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