aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/leds.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index dc1178f6184b..00f89fd6c52a 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -14,6 +14,7 @@
14 14
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/spinlock.h> 16#include <linux/spinlock.h>
17#include <linux/rwsem.h>
17 18
18struct device; 19struct device;
19/* 20/*
@@ -43,7 +44,7 @@ struct led_classdev {
43 44
44#ifdef CONFIG_LEDS_TRIGGERS 45#ifdef CONFIG_LEDS_TRIGGERS
45 /* Protects the trigger data below */ 46 /* Protects the trigger data below */
46 rwlock_t trigger_lock; 47 struct rw_semaphore trigger_lock;
47 48
48 struct led_trigger *trigger; 49 struct led_trigger *trigger;
49 struct list_head trig_list; 50 struct list_head trig_list;
@@ -53,7 +54,15 @@ struct led_classdev {
53 54
54extern int led_classdev_register(struct device *parent, 55extern int led_classdev_register(struct device *parent,
55 struct led_classdev *led_cdev); 56 struct led_classdev *led_cdev);
56extern void led_classdev_unregister(struct led_classdev *led_cdev); 57extern void __led_classdev_unregister(struct led_classdev *led_cdev, bool sus);
58static inline void led_classdev_unregister(struct led_classdev *lcd)
59{
60 __led_classdev_unregister(lcd, false);
61}
62static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
63{
64 __led_classdev_unregister(lcd, true);
65}
57extern void led_classdev_suspend(struct led_classdev *led_cdev); 66extern void led_classdev_suspend(struct led_classdev *led_cdev);
58extern void led_classdev_resume(struct led_classdev *led_cdev); 67extern void led_classdev_resume(struct led_classdev *led_cdev);
59 68