Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[sfrench/cifs-2.6.git] / security / inode.c
index b28a8acae34d7082dcb52519f1ebb927a2e1c9ae..acc6cf0d79001fa06d53c5b592fb4c90f5ea88a2 100644 (file)
@@ -315,20 +315,19 @@ void securityfs_remove(struct dentry *dentry)
 }
 EXPORT_SYMBOL_GPL(securityfs_remove);
 
-static decl_subsys(security, NULL, NULL);
+static struct kobject *security_kobj;
 
 static int __init securityfs_init(void)
 {
        int retval;
 
-       kobj_set_kset_s(&security_subsys, kernel_subsys);
-       retval = subsystem_register(&security_subsys);
-       if (retval)
-               return retval;
+       security_kobj = kobject_create_and_add("security", kernel_kobj);
+       if (!security_kobj)
+               return -EINVAL;
 
        retval = register_filesystem(&fs_type);
        if (retval)
-               subsystem_unregister(&security_subsys);
+               kobject_put(security_kobj);
        return retval;
 }