summaryrefslogtreecommitdiffstats
path: root/drivers/leds/led-core.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-12-31 23:09:44 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-12-31 23:09:44 +0000
commit72f8da329e07ad8a72c1f0e96b8955cfeb7c7329 (patch)
tree7440f70caf2fb70e987f814cebcdf233a17b425c /drivers/leds/led-core.c
parente697789d64f8748cb219d7f5c413c512953802cc (diff)
downloadlinux-72f8da329e07ad8a72c1f0e96b8955cfeb7c7329.tar.bz2
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/led-core.c')
-rw-r--r--drivers/leds/led-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 9b015f9af351..5d1ca10524b6 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -14,11 +14,11 @@
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
-#include <linux/spinlock.h>
+#include <linux/rwsem.h>
#include <linux/leds.h>
#include "leds.h"
-DEFINE_RWLOCK(leds_list_lock);
+DECLARE_RWSEM(leds_list_lock);
LIST_HEAD(leds_list);
EXPORT_SYMBOL_GPL(leds_list);