]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/debugfs/inode.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6-omap-h63xx.git] / fs / debugfs / inode.c
index 6a713b33992f4caedaecb6ba604c47d25e6e6a07..e9602d85c11d0220d5cbccf7817c25b10a6d068e 100644 (file)
 
 #define DEBUGFS_MAGIC  0x64626720
 
-/* declared over in file.c */
-extern struct file_operations debugfs_file_operations;
-extern struct inode_operations debugfs_link_operations;
-
 static struct vfsmount *debugfs_mount;
 static int debugfs_mount_count;
 
@@ -426,20 +422,19 @@ exit:
 }
 EXPORT_SYMBOL_GPL(debugfs_rename);
 
-static decl_subsys(debug, NULL, NULL);
+static struct kobject *debug_kobj;
 
 static int __init debugfs_init(void)
 {
        int retval;
 
-       kobj_set_kset_s(&debug_subsys, kernel_subsys);
-       retval = subsystem_register(&debug_subsys);
-       if (retval)
-               return retval;
+       debug_kobj = kobject_create_and_add("debug", kernel_kobj);
+       if (!debug_kobj)
+               return -EINVAL;
 
        retval = register_filesystem(&debug_fs_type);
        if (retval)
-               subsystem_unregister(&debug_subsys);
+               kobject_put(debug_kobj);
        return retval;
 }
 
@@ -447,7 +442,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_put(debug_kobj);
 }
 
 core_initcall(debugfs_init);