diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-12-31 18:09:44 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-12-31 18:09:44 -0500 |
commit | 72f8da329e07ad8a72c1f0e96b8955cfeb7c7329 (patch) | |
tree | 7440f70caf2fb70e987f814cebcdf233a17b425c /drivers/leds/leds.h | |
parent | e697789d64f8748cb219d7f5c413c512953802cc (diff) |
leds: Fix leds_list_lock locking issues
Covert leds_list_lock to a rw_sempahore to match previous LED trigger
locking fixes, fixing lock ordering.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r-- | drivers/leds/leds.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index f2f3884fe063..12b6fe93b135 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define __LEDS_H_INCLUDED | 14 | #define __LEDS_H_INCLUDED |
15 | 15 | ||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/rwsem.h> | ||
17 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
18 | 19 | ||
19 | static inline void led_set_brightness(struct led_classdev *led_cdev, | 20 | static inline void led_set_brightness(struct led_classdev *led_cdev, |
@@ -26,7 +27,7 @@ static inline void led_set_brightness(struct led_classdev *led_cdev, | |||
26 | led_cdev->brightness_set(led_cdev, value); | 27 | led_cdev->brightness_set(led_cdev, value); |
27 | } | 28 | } |
28 | 29 | ||
29 | extern rwlock_t leds_list_lock; | 30 | extern struct rw_semaphore leds_list_lock; |
30 | extern struct list_head leds_list; | 31 | extern struct list_head leds_list; |
31 | 32 | ||
32 | #ifdef CONFIG_LEDS_TRIGGERS | 33 | #ifdef CONFIG_LEDS_TRIGGERS |