class: change internal semaphore to a mutex
Now that the lockdep infrastructure in the class core is in place, we
should be able to properly change the internal class semaphore to be a
mutex.
David wrote the original patch, and Greg fixed it up to apply properly
due to all of the recent changes in this area.
From: Dave Young <hidave.darkstar@gmail.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/base/base.h b/drivers/base/base.h
index c035dc2..31dc0cd 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -44,7 +44,7 @@
* @class_devices - list of devices associated with this class
* @class_interfaces - list of class_interfaces associated with this class
* @class_dirs - "glue" directory for virtual devices associated with this class
- * @class_sem - semaphore to protect the children, devices, and interfaces lists.
+ * @class_mutex - mutex to protect the children, devices, and interfaces lists.
* @class - pointer back to the struct class that this structure is associated
* with.
*
@@ -57,7 +57,7 @@
struct list_head class_devices;
struct list_head class_interfaces;
struct kset class_dirs;
- struct semaphore class_sem;
+ struct mutex class_mutex;
struct class *class;
};
#define to_class(obj) \