summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-06-15 17:31:56 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 23:40:49 +0400
commitb9d9c82b4d081feb464f62dfc786c8621d09ecd2 (patch)
tree511d15b4d7aaba80a2c0fe49622a3224ca386122 /block
parent23681e479129854305da1da32f7f1eaf635ef22c (diff)
downloadlinux-b9d9c82b4d081feb464f62dfc786c8621d09ecd2.tar.xz
[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>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 5a8d3bf02f17..8d7339511e5e 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -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