Skip to content

Commit

Permalink
regulator: max8952 - fix max8952_set_voltage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Oct 28, 2010
1 parent da05738 commit ec10b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/max8952.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev,
int min_uV, int max_uV)
{
struct max8952_data *max8952 = rdev_get_drvdata(rdev);
u8 vid = -1, i;
s8 vid = -1, i;

if (!gpio_is_valid(max8952->pdata->gpio_vid0) ||
!gpio_is_valid(max8952->pdata->gpio_vid0)) {
Expand Down

0 comments on commit ec10b0e

Please sign in to comment.