diff options
author | David Barksdale <amatus@amatus.name> | 2014-08-13 16:14:13 -0500 |
---|---|---|
committer | David Barksdale <amatus@amatus.name> | 2014-08-13 16:14:13 -0500 |
commit | ace6c6d243016e272050787c14e27a83ecd94a25 (patch) | |
tree | c837edb1ca98b2552fbc7edba47aeb63f98ca1f0 /drivers/leds/leds.h | |
parent | 1b6e1688bd215cd7c9cb75650fa815a1ec6567e1 (diff) |
gpl-source-mybooklive-010002-update.zipgpl-source-mybooklive-010103-update.zipgpl-source-mybooklive-010002-update.zip
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r-- | drivers/leds/leds.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index 2dd8ecbfdc3..f4b75500b60 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -17,6 +17,25 @@ #include <linux/rwsem.h> #include <linux/leds.h> +static inline void led_set_color(struct led_classdev *led_cdev, + enum led_brightness value) +{ + led_cdev->color = value; + if (!(led_cdev->flags & LED_SUSPENDED)) + led_cdev->color_set(led_cdev, value); +} + +static inline int led_get_color(struct led_classdev *led_cdev) +{ + return led_cdev->color; +} +static inline void led_set_blink(struct led_classdev *led_cdev, + enum led_brightness value) +{ + led_cdev->blink = value; + led_cdev->blink_set_3g(led_cdev, value); +} + static inline void led_set_brightness(struct led_classdev *led_cdev, enum led_brightness value) { |