diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-27 05:53:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 20:32:39 -0400 |
commit | 34af946a22724c4e2b204957f2b24b22a0fb121c (patch) | |
tree | 7881dcbd0a698257c126198cdb6d97d4e45ee51e /drivers/leds | |
parent | b6cd0b772dcc5dc9b4c03d53946474dee399fa72 (diff) |
[PATCH] spin/rwlock init cleanups
locking init cleanups:
- convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
- convert rwlocks in a similar manner
this patch was generated automatically.
Motivation:
- cleanliness
- lockdep needs control of lock initialization, which the open-coded
variants do not give
- it's also useful for -rt and for lock debugging in general
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/led-core.c | 2 | ||||
-rw-r--r-- | drivers/leds/led-triggers.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index fe6541326c71..9b015f9af351 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include "leds.h" | 19 | #include "leds.h" |
20 | 20 | ||
21 | rwlock_t leds_list_lock = RW_LOCK_UNLOCKED; | 21 | DEFINE_RWLOCK(leds_list_lock); |
22 | LIST_HEAD(leds_list); | 22 | LIST_HEAD(leds_list); |
23 | 23 | ||
24 | EXPORT_SYMBOL_GPL(leds_list); | 24 | EXPORT_SYMBOL_GPL(leds_list); |
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index 5e2cd8be1191..1b1ce6523960 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c | |||
@@ -26,7 +26,7 @@ | |||
26 | /* | 26 | /* |
27 | * Nests outside led_cdev->trigger_lock | 27 | * Nests outside led_cdev->trigger_lock |
28 | */ | 28 | */ |
29 | static rwlock_t triggers_list_lock = RW_LOCK_UNLOCKED; | 29 | static DEFINE_RWLOCK(triggers_list_lock); |
30 | static LIST_HEAD(trigger_list); | 30 | static LIST_HEAD(trigger_list); |
31 | 31 | ||
32 | ssize_t led_trigger_store(struct class_device *dev, const char *buf, | 32 | ssize_t led_trigger_store(struct class_device *dev, const char *buf, |