diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-06 13:36:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:23 -0500 |
commit | 830d3cfb16728e2496edc2985ad8f68025135e37 (patch) | |
tree | 11541c0ac058745a2ab4269b84669a8341ece7ce /fs/partitions | |
parent | c60b71787982cefcf9fa09aa281fa8c4c685d557 (diff) |
kset: convert block_subsys to use kset_create
Dynamically create the kset instead of declaring it statically. We also
rename block_subsys to block_kset to catch all users of this symbol
with a build error instead of an easy-to-ignore build warning.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/partitions')
-rw-r--r-- | fs/partitions/check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 69685bb51c62..9184215f3ef3 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -316,7 +316,7 @@ static struct attribute * default_attrs[] = { | |||
316 | NULL, | 316 | NULL, |
317 | }; | 317 | }; |
318 | 318 | ||
319 | extern struct kset block_subsys; | 319 | extern struct kset *block_kset; |
320 | 320 | ||
321 | static void part_release(struct kobject *kobj) | 321 | static void part_release(struct kobject *kobj) |
322 | { | 322 | { |
@@ -393,7 +393,7 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len, | |||
393 | kobject_add(&p->kobj); | 393 | kobject_add(&p->kobj); |
394 | if (!disk->part_uevent_suppress) | 394 | if (!disk->part_uevent_suppress) |
395 | kobject_uevent(&p->kobj, KOBJ_ADD); | 395 | kobject_uevent(&p->kobj, KOBJ_ADD); |
396 | sysfs_create_link(&p->kobj, &block_subsys.kobj, "subsystem"); | 396 | sysfs_create_link(&p->kobj, &block_kset->kobj, "subsystem"); |
397 | if (flags & ADDPART_FLAG_WHOLEDISK) { | 397 | if (flags & ADDPART_FLAG_WHOLEDISK) { |
398 | static struct attribute addpartattr = { | 398 | static struct attribute addpartattr = { |
399 | .name = "whole_disk", | 399 | .name = "whole_disk", |
@@ -448,7 +448,7 @@ static int disk_sysfs_symlinks(struct gendisk *disk) | |||
448 | goto err_out_dev_link; | 448 | goto err_out_dev_link; |
449 | } | 449 | } |
450 | 450 | ||
451 | err = sysfs_create_link(&disk->kobj, &block_subsys.kobj, | 451 | err = sysfs_create_link(&disk->kobj, &block_kset->kobj, |
452 | "subsystem"); | 452 | "subsystem"); |
453 | if (err) | 453 | if (err) |
454 | goto err_out_disk_name_lnk; | 454 | goto err_out_disk_name_lnk; |