summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-03-08 23:41:29 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-03-08 23:41:29 -0800
commit0c156ba8ede6d99bd1738d7d987d9d58f65d0aa9 (patch)
tree911c9ad14fe704d231192d9058dd8ffb5d864099 /include/linux
parentd32accb04cc6c42c61fe9e9641a176c00cdd1cb8 (diff)
[PATCH] class: add a semaphore to struct class, and use that instead of the subsystem rwsem.
This moves us away from using the rwsem, although recursive adds and removes of class devices is not yet possible (nor is it really known if it even is needed.) So this simple change is done instead. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index e98232688899..a33424d41038 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -15,7 +15,6 @@
#include <linux/ioport.h>
#include <linux/kobject.h>
#include <linux/list.h>
-#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/pm.h>
@@ -148,6 +147,7 @@ struct class {
struct subsystem subsys;
struct list_head children;
struct list_head interfaces;
+ struct semaphore sem; /* locks both the children and interfaces lists */
struct class_attribute * class_attrs;
struct class_device_attribute * class_dev_attrs;