Commit 69d8e138 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

kobject: convert securityfs 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>
Acked-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5c89e17e
...@@ -315,20 +315,19 @@ void securityfs_remove(struct dentry *dentry) ...@@ -315,20 +315,19 @@ void securityfs_remove(struct dentry *dentry)
} }
EXPORT_SYMBOL_GPL(securityfs_remove); EXPORT_SYMBOL_GPL(securityfs_remove);
static decl_subsys(security, NULL); static struct kobject *security_kobj;
static int __init securityfs_init(void) static int __init securityfs_init(void)
{ {
int retval; int retval;
security_subsys.kobj.kset = &kernel_subsys; security_kobj = kobject_create_and_add("security", &kernel_subsys.kobj);
retval = subsystem_register(&security_subsys); if (!security_kobj)
if (retval) return -EINVAL;
return retval;
retval = register_filesystem(&fs_type); retval = register_filesystem(&fs_type);
if (retval) if (retval)
subsystem_unregister(&security_subsys); kobject_unregister(security_kobj);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment