From 29ab311c44fd9de932bceddc6b2587600abd1c49 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 2 Aug 2013 11:23:01 -0700 Subject: leds: leds-lp3944, fix "sparse" warning "mixing different enum types" Fix a warning from "sparse": drivers/leds/leds-lp3944.c:292:23: warning: mixing different enum types drivers/leds/leds-lp3944.c:292:23: int enum led_brightness versus drivers/leds/leds-lp3944.c:292:23: int enum lp3944_status Keeping track of LP3944_LED_STATUS_OFF and LP3944_LED_STATUS_ON only in lp3944_led_set_brightness() is OK, as the handling of DIM (blinking) mode[s] is in lp3944_led_set_blink(). Reported-by: Dan Carpenter Signed-off-by: Antonio Ospite Reviewed-by: Jingoo Han Signed-off-by: Bryan Wu --- drivers/leds/leds-lp3944.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/leds') diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c index 2b53d10e560..8e1abdcd4c9 100644 --- a/drivers/leds/leds-lp3944.c +++ b/drivers/leds/leds-lp3944.c @@ -289,7 +289,7 @@ static void lp3944_led_set_brightness(struct led_classdev *led_cdev, dev_dbg(&led->client->dev, "%s: %s, %d\n", __func__, led_cdev->name, brightness); - led->status = brightness; + led->status = !!brightness; schedule_work(&led->work); } -- cgit v1.2.3-70-g09d2