summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2002-10-16 03:12:42 -0700
committerPatrick Mochel <mochel@osdl.org>2002-10-16 03:12:42 -0700
commitd9b24a116f72056c7ac8bb2cdcd9dfd84ce85513 (patch)
tree3db188acd706ad3de937f6477d2353de67db780b /include/linux/device.h
parentf21c8fc316b1cf3c537656508fd463522d58cdf3 (diff)
driver model: add per-class rwsem and protect list accesses with it.
This is similar to struct bus_type's rwsem, though classes aren't doing anything nearly as fancy with it. We just make sure to take it when ever we add or remove any devices or drivers.
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index c0f8d6c5e4bf..fdcdf0077027 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -163,6 +163,8 @@ extern void driver_remove_file(struct device_driver *, struct driver_attribute *
*/
struct device_class {
char * name;
+ struct rw_semaphore rwsem;
+
atomic_t refcount;
u32 present;