mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 23:29:46 +00:00
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>
This commit is contained in:
parent
7171511eae
commit
5f986f7c2b
@ -127,7 +127,7 @@ static int tps65218_pmic_set_voltage_sel(struct regulator_dev *dev,
|
|||||||
static int tps65218_pmic_enable(struct regulator_dev *dev)
|
static int tps65218_pmic_enable(struct regulator_dev *dev)
|
||||||
{
|
{
|
||||||
struct tps65218 *tps = rdev_get_drvdata(dev);
|
struct tps65218 *tps = rdev_get_drvdata(dev);
|
||||||
unsigned int rid = rdev_get_id(dev);
|
int rid = rdev_get_id(dev);
|
||||||
|
|
||||||
if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
|
if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -141,7 +141,7 @@ static int tps65218_pmic_enable(struct regulator_dev *dev)
|
|||||||
static int tps65218_pmic_disable(struct regulator_dev *dev)
|
static int tps65218_pmic_disable(struct regulator_dev *dev)
|
||||||
{
|
{
|
||||||
struct tps65218 *tps = rdev_get_drvdata(dev);
|
struct tps65218 *tps = rdev_get_drvdata(dev);
|
||||||
unsigned int rid = rdev_get_id(dev);
|
int rid = rdev_get_id(dev);
|
||||||
|
|
||||||
if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
|
if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user