Commit 6bdaaf0e authored by Sachin Kamat's avatar Sachin Kamat Committed by Mark Brown

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: default avatarSachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7171511e
...@@ -68,7 +68,7 @@ static const struct regulator_linear_range tps65217_uv2_ranges[] = { ...@@ -68,7 +68,7 @@ static const struct regulator_linear_range tps65217_uv2_ranges[] = {
static int tps65217_pmic_enable(struct regulator_dev *dev) static int tps65217_pmic_enable(struct regulator_dev *dev)
{ {
struct tps65217 *tps = rdev_get_drvdata(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) if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
return -EINVAL; return -EINVAL;
...@@ -82,7 +82,7 @@ static int tps65217_pmic_enable(struct regulator_dev *dev) ...@@ -82,7 +82,7 @@ static int tps65217_pmic_enable(struct regulator_dev *dev)
static int tps65217_pmic_disable(struct regulator_dev *dev) static int tps65217_pmic_disable(struct regulator_dev *dev)
{ {
struct tps65217 *tps = rdev_get_drvdata(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) if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
return -EINVAL; return -EINVAL;
......
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