aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max8952.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-10-25 19:55:54 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-10-28 17:40:32 -0400
commitec10b0e94ebe7de3b301d60e6f7f4a12d3d280c6 (patch)
treea4e2f4b54fa22e52f3f634d5f5a10c4206e2fa2a /drivers/regulator/max8952.c
parentda05738e94b644d759f28184a9f0bf875b271c55 (diff)
regulator: max8952 - fix max8952_set_voltage
In current implementation, vid is declared as u8, then "vid == -1" is always false, and "vid >= 0" is always true. Thus change it to s8. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/max8952.c')
-rw-r--r--drivers/regulator/max8952.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index 7d6aacf5c493..0d5dda4fd911 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -136,7 +136,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev,
136 int min_uV, int max_uV) 136 int min_uV, int max_uV)
137{ 137{
138 struct max8952_data *max8952 = rdev_get_drvdata(rdev); 138 struct max8952_data *max8952 = rdev_get_drvdata(rdev);
139 u8 vid = -1, i; 139 s8 vid = -1, i;
140 140
141 if (!gpio_is_valid(max8952->pdata->gpio_vid0) || 141 if (!gpio_is_valid(max8952->pdata->gpio_vid0) ||
142 !gpio_is_valid(max8952->pdata->gpio_vid0)) { 142 !gpio_is_valid(max8952->pdata->gpio_vid0)) {