aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-06-15 09:31:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:40:49 -0400
commitb9d9c82b4d081feb464f62dfc786c8621d09ecd2 (patch)
tree511d15b4d7aaba80a2c0fe49622a3224ca386122 /block
parent23681e479129854305da1da32f7f1eaf635ef22c (diff)
[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 @@
17#include <linux/buffer_head.h> 17#include <linux/buffer_head.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19 19
20static struct subsystem block_subsys; 20struct subsystem block_subsys;
21
22static DEFINE_MUTEX(block_subsys_lock); 21static DEFINE_MUTEX(block_subsys_lock);
23 22
24/* 23/*
@@ -511,9 +510,7 @@ static struct kset_uevent_ops block_uevent_ops = {
511 .uevent = block_uevent, 510 .uevent = block_uevent,
512}; 511};
513 512
514/* declare block_subsys. */ 513decl_subsys(block, &ktype_block, &block_uevent_ops);
515static decl_subsys(block, &ktype_block, &block_uevent_ops);
516
517 514
518/* 515/*
519 * aggregate disk stat collector. Uses the same stats that the sysfs 516 * aggregate disk stat collector. Uses the same stats that the sysfs