aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps65218-regulator.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@samsung.com>2014-06-24 04:29:16 -0400
committerMark Brown <broonie@linaro.org>2014-06-24 11:25:13 -0400
commit5f986f7c2b878142f80cc23391631a71772692a8 (patch)
treea99cc48a4ddb801420d00c9d92ce23e5061a616b /drivers/regulator/tps65218-regulator.c
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
regulator: tps65218: Fix build warnings
rdev_get_id() returns an int. Convert rid to type int to avoid the following warnings: drivers/regulator/tps65218-regulator.c:132:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/regulator/tps65218-regulator.c:146: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>
Diffstat (limited to 'drivers/regulator/tps65218-regulator.c')
-rw-r--r--drivers/regulator/tps65218-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index 69b4b7750410..8b24404be0bd 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -127,7 +127,7 @@ static int tps65218_pmic_set_voltage_sel(struct regulator_dev *dev,
127static int tps65218_pmic_enable(struct regulator_dev *dev) 127static int tps65218_pmic_enable(struct regulator_dev *dev)
128{ 128{
129 struct tps65218 *tps = rdev_get_drvdata(dev); 129 struct tps65218 *tps = rdev_get_drvdata(dev);
130 unsigned int rid = rdev_get_id(dev); 130 int rid = rdev_get_id(dev);
131 131
132 if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) 132 if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
133 return -EINVAL; 133 return -EINVAL;
@@ -141,7 +141,7 @@ static int tps65218_pmic_enable(struct regulator_dev *dev)
141static int tps65218_pmic_disable(struct regulator_dev *dev) 141static int tps65218_pmic_disable(struct regulator_dev *dev)
142{ 142{
143 struct tps65218 *tps = rdev_get_drvdata(dev); 143 struct tps65218 *tps = rdev_get_drvdata(dev);
144 unsigned int rid = rdev_get_id(dev); 144 int rid = rdev_get_id(dev);
145 145
146 if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) 146 if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
147 return -EINVAL; 147 return -EINVAL;