aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds/leds.h
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2014-08-13 16:14:13 -0500
committerDavid Barksdale <amatus@amatus.name>2014-08-13 16:14:13 -0500
commitace6c6d243016e272050787c14e27a83ecd94a25 (patch)
treec837edb1ca98b2552fbc7edba47aeb63f98ca1f0 /drivers/leds/leds.h
parent1b6e1688bd215cd7c9cb75650fa815a1ec6567e1 (diff)
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r--drivers/leds/leds.h19
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)
{