From 830d3cfb16728e2496edc2985ad8f68025135e37 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 6 Nov 2007 10:36:58 -0800 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- fs/partitions/check.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/partitions') diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 69685bb51c6..9184215f3ef 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -316,7 +316,7 @@ static struct attribute * default_attrs[] = { NULL, }; -extern struct kset block_subsys; +extern struct kset *block_kset; static void part_release(struct kobject *kobj) { @@ -393,7 +393,7 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len, kobject_add(&p->kobj); if (!disk->part_uevent_suppress) kobject_uevent(&p->kobj, KOBJ_ADD); - sysfs_create_link(&p->kobj, &block_subsys.kobj, "subsystem"); + sysfs_create_link(&p->kobj, &block_kset->kobj, "subsystem"); if (flags & ADDPART_FLAG_WHOLEDISK) { static struct attribute addpartattr = { .name = "whole_disk", @@ -448,7 +448,7 @@ static int disk_sysfs_symlinks(struct gendisk *disk) goto err_out_dev_link; } - err = sysfs_create_link(&disk->kobj, &block_subsys.kobj, + err = sysfs_create_link(&disk->kobj, &block_kset->kobj, "subsystem"); if (err) goto err_out_disk_name_lnk; -- cgit v1.2.3