aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds/leds.h
diff options
context:
space:
mode:
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)
{