提交 29ab311c 编写于 作者: A Antonio Ospite 提交者: Bryan Wu

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAntonio Ospite <ospite@studenti.unina.it>
Reviewed-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NBryan Wu <cooloney@gmail.com>
上级 2e87c092
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册