summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-01 09:29:06 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:15 -0800
commit9b477705360c16198d7a4bd73d199f5a957585b0 (patch)
tree1ca020e71a70612a5d122d9a0b22745e7eac76c3 /arch/s390
parent2d72fc00a1fb055e6127ccd30cac3f0eafaa98d0 (diff)
downloadlinux-9b477705360c16198d7a4bd73d199f5a957585b0.tar.gz
linux-9b477705360c16198d7a4bd73d199f5a957585b0.tar.bz2
linux-9b477705360c16198d7a4bd73d199f5a957585b0.zip
kobject: convert s390 hypervisor to use kobject_create
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Thanks to Cornelia for the build fix. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Michael Holzheu <holzheu@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/hypfs/inode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index b0ad479e7487..631a6109f642 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -490,7 +490,7 @@ static struct super_operations hypfs_s_ops = {
.show_options = hypfs_show_options,
};
-static decl_subsys(s390, NULL);
+static struct kobject *s390_kobj;
static int __init hypfs_init(void)
{
@@ -506,17 +506,18 @@ static int __init hypfs_init(void)
goto fail_diag;
}
}
- s390_subsys.kobj.parent = hypervisor_kobj;
- rc = subsystem_register(&s390_subsys);
- if (rc)
+ s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
+ if (!s390_kobj) {
+ rc = -ENOMEM;;
goto fail_sysfs;
+ }
rc = register_filesystem(&hypfs_type);
if (rc)
goto fail_filesystem;
return 0;
fail_filesystem:
- subsystem_unregister(&s390_subsys);
+ kobject_unregister(s390_kobj);
fail_sysfs:
if (!MACHINE_IS_VM)
hypfs_diag_exit();
@@ -530,7 +531,7 @@ static void __exit hypfs_exit(void)
if (!MACHINE_IS_VM)
hypfs_diag_exit();
unregister_filesystem(&hypfs_type);
- subsystem_unregister(&s390_subsys);
+ kobject_unregister(s390_kobj);
}
module_init(hypfs_init)