aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-11-10 13:29:04 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-12-07 09:06:53 +0000
commitdc47206e552c0850ad11f7e9a1fca0a3c92f5d65 (patch)
tree01188f5ca89d295009a618e1be6c5cea2926a522 /include/linux
parentf194d132e4971111f85c18c96067acffb13cee6d (diff)
leds: Fix led trigger locking bugs
Convert part of the led trigger core from rw spinlocks to rw semaphores. We're calling functions which can sleep from invalid contexts otherwise. Fixes bug #9264. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/leds.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index dc1178f6184..b4130ff58d0 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -14,6 +14,7 @@
#include <linux/list.h>
#include <linux/spinlock.h>
+#include <linux/rwsem.h>
struct device;
/*
@@ -43,7 +44,7 @@ struct led_classdev {
#ifdef CONFIG_LEDS_TRIGGERS
/* Protects the trigger data below */
- rwlock_t trigger_lock;
+ struct rw_semaphore trigger_lock;
struct led_trigger *trigger;
struct list_head trig_list;