Commit 46288030 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

kobject core: remove rwsem from struct subsystem

It isn't used at all by the driver core anymore, and the few usages of
it within the kernel have now all been fixed as most of them were using
it incorrectly.  So remove it.

Now the whole struct subsys can be removed from the system, but that's
for a later patch...

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2f66858a
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/rwsem.h>
#include <linux/kref.h> #include <linux/kref.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/wait.h> #include <linux/wait.h>
...@@ -177,7 +176,6 @@ extern struct kobject * kset_find_obj(struct kset *, const char *); ...@@ -177,7 +176,6 @@ extern struct kobject * kset_find_obj(struct kset *, const char *);
struct subsystem { struct subsystem {
struct kset kset; struct kset kset;
struct rw_semaphore rwsem;
}; };
#define decl_subsys(_name,_type,_uevent_ops) \ #define decl_subsys(_name,_type,_uevent_ops) \
......
...@@ -652,7 +652,6 @@ struct kobject * kset_find_obj(struct kset * kset, const char * name) ...@@ -652,7 +652,6 @@ struct kobject * kset_find_obj(struct kset * kset, const char * name)
void subsystem_init(struct subsystem * s) void subsystem_init(struct subsystem * s)
{ {
init_rwsem(&s->rwsem);
kset_init(&s->kset); kset_init(&s->kset);
} }
...@@ -661,8 +660,7 @@ void subsystem_init(struct subsystem * s) ...@@ -661,8 +660,7 @@ void subsystem_init(struct subsystem * s)
* @s: the subsystem we're registering. * @s: the subsystem we're registering.
* *
* Once we register the subsystem, we want to make sure that * Once we register the subsystem, we want to make sure that
* the kset points back to this subsystem for correct usage of * the kset points back to this subsystem.
* the rwsem.
*/ */
int subsystem_register(struct subsystem * s) int subsystem_register(struct subsystem * s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment