[PATCH] Driver core: add generic "subsystem" link to all devices
Like the SUBSYTEM= key we find in the environment of the uevent, this creates a generic "subsystem" link in sysfs for every device. Userspace usually doesn't care at all if its a "class" or a "bus" device. This provides an unified way to determine the subsytem of a device, regardless of the way the driver core has created it. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
23681e4791
commit
b9d9c82b4d
@@ -17,8 +17,7 @@
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
static struct subsystem block_subsys;
|
||||
|
||||
struct subsystem block_subsys;
|
||||
static DEFINE_MUTEX(block_subsys_lock);
|
||||
|
||||
/*
|
||||
@@ -511,9 +510,7 @@ static struct kset_uevent_ops block_uevent_ops = {
|
||||
.uevent = block_uevent,
|
||||
};
|
||||
|
||||
/* declare block_subsys. */
|
||||
static decl_subsys(block, &ktype_block, &block_uevent_ops);
|
||||
|
||||
decl_subsys(block, &ktype_block, &block_uevent_ops);
|
||||
|
||||
/*
|
||||
* aggregate disk stat collector. Uses the same stats that the sysfs
|
||||
|
Reference in New Issue
Block a user