regulator: max8952 - fix max8952_set_voltage
PATCH v2 2/2 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.
--- drivers/regulator/max8952.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/max8952.c +1 -1
@@ -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)) {
Signature · 1 line
1.7.0.4
Quoted 5 lines · Axel Lin
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 <[email protected]>
Kyungmin Park
Acked-byHi Axel,
Thank you for your works.
Quoted 14 lines · Mark Brown
Quoted 5 lines · Axel Lin
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 <[email protected]>Acked-by Mark Brown <[email protected]>--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 17 lines · Kyungmin Park
Hi Axel,
Thank you for your works.
Acked-by Kyungmin Park <[email protected]>Quoted 9 lines · Mark Brown
Quoted 5 lines · Axel Lin
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 <[email protected]>Acked-by Mark Brown <[email protected]>--
Both applied.
Thanks
Liam
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk