summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorJacek Anaszewski <j.anaszewski@samsung.com>2014-08-08 09:09:44 +0200
committerBryan Wu <cooloney@gmail.com>2014-09-12 01:55:27 +0200
commit7f14e6b9c36f6696eb937bc0cf86a7732aa89904 (patch)
tree239581b0a7de9869751b1a431ab824fa15598ac6 /drivers/leds
parentleds: avoid using DEVICE_ATTR macro for max_brightness attribute (diff)
downloadlinux-7f14e6b9c36f6696eb937bc0cf86a7732aa89904.tar.xz
linux-7f14e6b9c36f6696eb937bc0cf86a7732aa89904.zip
leds: lp3944: fix sparse warning
Fix sparse warning appeared after changing brightness type in the leds.h from int to enum led_brightness. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-lp3944.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c
index 8e1abdcd4c9d..53144fb96167 100644
--- a/drivers/leds/leds-lp3944.c
+++ b/drivers/leds/leds-lp3944.c
@@ -335,7 +335,8 @@ static int lp3944_configure(struct i2c_client *client,
}
/* to expose the default value to userspace */
- led->ldev.brightness = led->status;
+ led->ldev.brightness =
+ (enum led_brightness) led->status;
/* Set the default led status */
err = lp3944_led_set(led, led->status);