]> git.baikalelectronics.ru Git - kernel.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)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 17 Apr 2012 14:17:11 +0000 (15:17 +0100)
commit1b2273d6d75906a1e53c36bcffea455be28fd997
treeacb5c8624f1af12cc9bb5235c5bc586b92efa832
parent0c35245a681e6df58b66b75c1aac123223ee3149
regulator: Fix the logic to ensure new voltage setting in valid range

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>
Cc: stable@vger.kernel.org
drivers/regulator/max8997.c