]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
leds: lp3944: fix sparse warning
authorJacek Anaszewski <j.anaszewski@samsung.com>
Fri, 8 Aug 2014 07:09:44 +0000 (00:09 -0700)
committerBryan Wu <cooloney@gmail.com>
Thu, 11 Sep 2014 23:55:27 +0000 (16:55 -0700)
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>
drivers/leds/leds-lp3944.c

index 8e1abdcd4c9d9789c207258c82ff9f33daa3a0df..53144fb9616702d3024bb505c1278b613bb02221 100644 (file)
@@ -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);