[PATCH] leds: lm355x: Fix sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't mix different enum types to fix the following sparse warnings.

drivers/leds/leds-lm355x.c:180:49: warning: mixing different enum types
drivers/leds/leds-lm355x.c:180:49:     int enum lm355x_tx2  versus
drivers/leds/leds-lm355x.c:180:49:     int enum lm355x_ntc
drivers/leds/leds-lm355x.c:191:49: warning: mixing different enum types
drivers/leds/leds-lm355x.c:191:49:     int enum lm355x_tx2  versus
drivers/leds/leds-lm355x.c:191:49:     int enum lm355x_ntc

Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
---
 drivers/leds/leds-lm355x.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-lm355x.c b/drivers/leds/leds-lm355x.c
index 591eb5e..9772aad 100644
--- a/drivers/leds/leds-lm355x.c
+++ b/drivers/leds/leds-lm355x.c
@@ -177,7 +177,8 @@ static int lm355x_chip_init(struct lm355x_chip_data *chip)
 	/* input and output pins configuration */
 	switch (chip->type) {
 	case CHIP_LM3554:
-		reg_val = pdata->pin_tx2 | pdata->ntc_pin;
+		reg_val = pdata->pin_tx2;
+		reg_val |= pdata->ntc_pin;
 		ret = regmap_update_bits(chip->regmap, 0xE0, 0x28, reg_val);
 		if (ret < 0)
 			goto out;
@@ -188,7 +189,9 @@ static int lm355x_chip_init(struct lm355x_chip_data *chip)
 		break;
 
 	case CHIP_LM3556:
-		reg_val = pdata->pin_tx2 | pdata->ntc_pin | pdata->pass_mode;
+		reg_val = pdata->pin_tx2;
+		reg_val |= pdata->ntc_pin;
+		reg_val |= pdata->pass_mode;
 		ret = regmap_update_bits(chip->regmap, 0x0A, 0xC4, reg_val);
 		if (ret < 0)
 			goto out;
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux