]> git.karo-electronics.de Git - karo-tx-linux.git/commit
regulator: Fix the logic to ensure new voltage setting in valid range
authorAxel Lin <axel.lin@gmail.com>
Wed, 11 Apr 2012 12:53:58 +0000 (20:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 May 2012 16:32:17 +0000 (09:32 -0700)
commit89ec66f87f76f389887b04a415f6dd53305bb9d0
tree7073cf14ae498169e1c0e0ddfdbd64138e68d85a
parentc35fda8ad637d6f86fad00139f7faaf3d1133302
regulator: Fix the logic to ensure new voltage setting in valid range

commit f55205f4d4a8823a11bb8b37ef2ecbd78fb09463 upstream.

I think this is a typo.
To ensure new voltage setting won't greater than desc->max,
the equation should be desc->min + desc->step * new_val <= desc->max.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/max8997.c