diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-06-15 09:31:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 15:40:49 -0400 |
commit | b9d9c82b4d081feb464f62dfc786c8621d09ecd2 (patch) | |
tree | 511d15b4d7aaba80a2c0fe49622a3224ca386122 /block/genhd.c | |
parent | 23681e479129854305da1da32f7f1eaf635ef22c (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/genhd.c')
-rw-r--r-- | block/genhd.c | 7 |
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 | ||
20 | static struct subsystem block_subsys; | 20 | struct subsystem block_subsys; |
21 | |||
22 | static DEFINE_MUTEX(block_subsys_lock); | 21 | static 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. */ | 513 | decl_subsys(block, &ktype_block, &block_uevent_ops); |
515 | static 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 |