regulator: rc5t583: Fix off-by-one valid range checking for selector
authorAxel Lin <axel.lin@gmail.com>
Wed, 4 Apr 2012 14:38:09 +0000 (22:38 +0800)
committerSimone Willett <swillett@nvidia.com>
Sun, 3 Jun 2012 15:08:48 +0000 (08:08 -0700)
commit37942f91eae17ea97ce20de7c3f74aac35a1120c
tree891ba2251ca1ee6b804ddba8da0cb012b23b1c90
parent7380f01e1d2d665f8ffc7656320cb53475d84a24
regulator: rc5t583: Fix off-by-one valid range checking for selector

The valid selector should be 0 ... nsteps-1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 9cc7a453b637d8c1f628f9873204ff55d7aa664c)

Change-Id: Ie1a39883036de3b2945d35854e0a16c46d2a9db2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105882
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
drivers/regulator/rc5t583-regulator.c