diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-29 15:13:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:11 -0500 |
commit | 191e186bd0589e28496745275157323a6f7902ca (patch) | |
tree | e6a1ac16284f92523c685121a8e77773048fd7e2 /fs/debugfs | |
parent | 69d8e1389551b107b1a8ec70c280cb7a56096666 (diff) |
kobject: convert debugfs 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.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/debugfs')
-rw-r--r-- | fs/debugfs/inode.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index f7f13516fc1a..667214200b03 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
@@ -426,20 +426,19 @@ exit: | |||
426 | } | 426 | } |
427 | EXPORT_SYMBOL_GPL(debugfs_rename); | 427 | EXPORT_SYMBOL_GPL(debugfs_rename); |
428 | 428 | ||
429 | static decl_subsys(debug, NULL); | 429 | static struct kobject *debug_kobj; |
430 | 430 | ||
431 | static int __init debugfs_init(void) | 431 | static int __init debugfs_init(void) |
432 | { | 432 | { |
433 | int retval; | 433 | int retval; |
434 | 434 | ||
435 | debug_subsys.kobj.kset = &kernel_subsys; | 435 | debug_kobj = kobject_create_and_add("debug", &kernel_subsys.kobj); |
436 | retval = subsystem_register(&debug_subsys); | 436 | if (!debug_kobj) |
437 | if (retval) | 437 | return -EINVAL; |
438 | return retval; | ||
439 | 438 | ||
440 | retval = register_filesystem(&debug_fs_type); | 439 | retval = register_filesystem(&debug_fs_type); |
441 | if (retval) | 440 | if (retval) |
442 | subsystem_unregister(&debug_subsys); | 441 | kobject_unregister(debug_kobj); |
443 | return retval; | 442 | return retval; |
444 | } | 443 | } |
445 | 444 | ||
@@ -447,7 +446,7 @@ static void __exit debugfs_exit(void) | |||
447 | { | 446 | { |
448 | simple_release_fs(&debugfs_mount, &debugfs_mount_count); | 447 | simple_release_fs(&debugfs_mount, &debugfs_mount_count); |
449 | unregister_filesystem(&debug_fs_type); | 448 | unregister_filesystem(&debug_fs_type); |
450 | subsystem_unregister(&debug_subsys); | 449 | kobject_unregister(debug_kobj); |
451 | } | 450 | } |
452 | 451 | ||
453 | core_initcall(debugfs_init); | 452 | core_initcall(debugfs_init); |