regulator: tps65217: Fix build warnings
authorSachin Kamat <sachin.kamat@samsung.com>
Tue, 24 Jun 2014 08:29:15 +0000 (13:59 +0530)
committerMark Brown <broonie@linaro.org>
Tue, 24 Jun 2014 15:23:00 +0000 (16:23 +0100)
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>
drivers/regulator/tps65217-regulator.c

index f7ed20a5a8b9a2907135abc52bfc5097e146adb6..d58db72a63b0fd450cf14742c53d0870900d7e82 100644 (file)
@@ -68,7 +68,7 @@ static const struct regulator_linear_range tps65217_uv2_ranges[] = {
 static int tps65217_pmic_enable(struct regulator_dev *dev)
 {
        struct tps65217 *tps = rdev_get_drvdata(dev);
-       unsigned int rid = rdev_get_id(dev);
+       int rid = rdev_get_id(dev);
 
        if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
                return -EINVAL;
@@ -82,7 +82,7 @@ static int tps65217_pmic_enable(struct regulator_dev *dev)
 static int tps65217_pmic_disable(struct regulator_dev *dev)
 {
        struct tps65217 *tps = rdev_get_drvdata(dev);
-       unsigned int rid = rdev_get_id(dev);
+       int rid = rdev_get_id(dev);
 
        if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
                return -EINVAL;