Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: tps65217: Fix build warnings

rdev_get_id() returns an int. Convert rid to type int to avoid the
following warnings:

drivers/regulator/tps65217-regulator.c:73:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/regulator/tps65217-regulator.c:87:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Sachin Kamat and committed by
Mark Brown
6bdaaf0e 7171511e

+2 -2
+2 -2
drivers/regulator/tps65217-regulator.c
··· 68 68 static int tps65217_pmic_enable(struct regulator_dev *dev) 69 69 { 70 70 struct tps65217 *tps = rdev_get_drvdata(dev); 71 - unsigned int rid = rdev_get_id(dev); 71 + int rid = rdev_get_id(dev); 72 72 73 73 if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4) 74 74 return -EINVAL; ··· 82 82 static int tps65217_pmic_disable(struct regulator_dev *dev) 83 83 { 84 84 struct tps65217 *tps = rdev_get_drvdata(dev); 85 - unsigned int rid = rdev_get_id(dev); 85 + int rid = rdev_get_id(dev); 86 86 87 87 if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4) 88 88 return -EINVAL;