Commit ec10b0e9 authored by Axel Lin's avatar Axel Lin Committed by Liam Girdwood

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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent da05738e
...@@ -136,7 +136,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev, ...@@ -136,7 +136,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev,
int min_uV, int max_uV) int min_uV, int max_uV)
{ {
struct max8952_data *max8952 = rdev_get_drvdata(rdev); struct max8952_data *max8952 = rdev_get_drvdata(rdev);
u8 vid = -1, i; s8 vid = -1, i;
if (!gpio_is_valid(max8952->pdata->gpio_vid0) || if (!gpio_is_valid(max8952->pdata->gpio_vid0) ||
!gpio_is_valid(max8952->pdata->gpio_vid0)) { !gpio_is_valid(max8952->pdata->gpio_vid0)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment