Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=191e186bd0589e28496745275157323a6f7902ca
Commit:     191e186bd0589e28496745275157323a6f7902ca
Parent:     69d8e1389551b107b1a8ec70c280cb7a56096666
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 20:13:17 2007 +0100
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:11 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 f7f1351..6672142 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -426,20 +426,19 @@ exit:
 }
 EXPORT_SYMBOL_GPL(debugfs_rename);
 
-static decl_subsys(debug, NULL);
+static struct kobject *debug_kobj;
 
 static int __init debugfs_init(void)
 {
        int retval;
 
-       debug_subsys.kobj.kset = &kernel_subsys;
-       retval = subsystem_register(&debug_subsys);
-       if (retval)
-               return retval;
+       debug_kobj = kobject_create_and_add("debug", &kernel_subsys.kobj);
+       if (!debug_kobj)
+               return -EINVAL;
 
        retval = register_filesystem(&debug_fs_type);
        if (retval)
-               subsystem_unregister(&debug_subsys);
+               kobject_unregister(debug_kobj);
        return retval;
 }
 
@@ -447,7 +446,7 @@ static void __exit debugfs_exit(void)
 {
        simple_release_fs(&debugfs_mount, &debugfs_mount_count);
        unregister_filesystem(&debug_fs_type);
-       subsystem_unregister(&debug_subsys);
+       kobject_unregister(debug_kobj);
 }
 
 core_initcall(debugfs_init);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to