diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-01 11:29:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:15 -0500 |
commit | 9b477705360c16198d7a4bd73d199f5a957585b0 (patch) | |
tree | 1ca020e71a70612a5d122d9a0b22745e7eac76c3 /arch/s390/hypfs | |
parent | 2d72fc00a1fb055e6127ccd30cac3f0eafaa98d0 (diff) |
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/hypfs')
-rw-r--r-- | arch/s390/hypfs/inode.c | 13 |
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 = { | |||
490 | .show_options = hypfs_show_options, | 490 | .show_options = hypfs_show_options, |
491 | }; | 491 | }; |
492 | 492 | ||
493 | static decl_subsys(s390, NULL); | 493 | static struct kobject *s390_kobj; |
494 | 494 | ||
495 | static int __init hypfs_init(void) | 495 | static int __init hypfs_init(void) |
496 | { | 496 | { |
@@ -506,17 +506,18 @@ static int __init hypfs_init(void) | |||
506 | goto fail_diag; | 506 | goto fail_diag; |
507 | } | 507 | } |
508 | } | 508 | } |
509 | s390_subsys.kobj.parent = hypervisor_kobj; | 509 | s390_kobj = kobject_create_and_add("s390", hypervisor_kobj); |
510 | rc = subsystem_register(&s390_subsys); | 510 | if (!s390_kobj) { |
511 | if (rc) | 511 | rc = -ENOMEM;; |
512 | goto fail_sysfs; | 512 | goto fail_sysfs; |
513 | } | ||
513 | rc = register_filesystem(&hypfs_type); | 514 | rc = register_filesystem(&hypfs_type); |
514 | if (rc) | 515 | if (rc) |
515 | goto fail_filesystem; | 516 | goto fail_filesystem; |
516 | return 0; | 517 | return 0; |
517 | 518 | ||
518 | fail_filesystem: | 519 | fail_filesystem: |
519 | subsystem_unregister(&s390_subsys); | 520 | kobject_unregister(s390_kobj); |
520 | fail_sysfs: | 521 | fail_sysfs: |
521 | if (!MACHINE_IS_VM) | 522 | if (!MACHINE_IS_VM) |
522 | hypfs_diag_exit(); | 523 | hypfs_diag_exit(); |
@@ -530,7 +531,7 @@ static void __exit hypfs_exit(void) | |||
530 | if (!MACHINE_IS_VM) | 531 | if (!MACHINE_IS_VM) |
531 | hypfs_diag_exit(); | 532 | hypfs_diag_exit(); |
532 | unregister_filesystem(&hypfs_type); | 533 | unregister_filesystem(&hypfs_type); |
533 | subsystem_unregister(&s390_subsys); | 534 | kobject_unregister(s390_kobj); |
534 | } | 535 | } |
535 | 536 | ||
536 | module_init(hypfs_init) | 537 | module_init(hypfs_init) |