mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Acked-by: Chris Wright <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
5c89e17e9c
commit
69d8e13895
1 changed files with 5 additions and 6 deletions
|
|
@ -315,20 +315,19 @@ void securityfs_remove(struct dentry *dentry)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(securityfs_remove);
|
||||
|
||||
static decl_subsys(security, NULL);
|
||||
static struct kobject *security_kobj;
|
||||
|
||||
static int __init securityfs_init(void)
|
||||
{
|
||||
int retval;
|
||||
|
||||
security_subsys.kobj.kset = &kernel_subsys;
|
||||
retval = subsystem_register(&security_subsys);
|
||||
if (retval)
|
||||
return retval;
|
||||
security_kobj = kobject_create_and_add("security", &kernel_subsys.kobj);
|
||||
if (!security_kobj)
|
||||
return -EINVAL;
|
||||
|
||||
retval = register_filesystem(&fs_type);
|
||||
if (retval)
|
||||
subsystem_unregister(&security_subsys);
|
||||
kobject_unregister(security_kobj);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue