diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-29 15:13:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:11 -0500 |
commit | 69d8e1389551b107b1a8ec70c280cb7a56096666 (patch) | |
tree | d487b8ce9435c4b225beb52e41eabc5ce68862e6 | |
parent | 5c89e17e9c2bc03ed16320967832b33b174e6234 (diff) |
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: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | security/inode.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/security/inode.c b/security/inode.c index 9e42f5f705b2..dfc5978d4298 100644 --- a/security/inode.c +++ b/security/inode.c | |||
@@ -315,20 +315,19 @@ void securityfs_remove(struct dentry *dentry) | |||
315 | } | 315 | } |
316 | EXPORT_SYMBOL_GPL(securityfs_remove); | 316 | EXPORT_SYMBOL_GPL(securityfs_remove); |
317 | 317 | ||
318 | static decl_subsys(security, NULL); | 318 | static struct kobject *security_kobj; |
319 | 319 | ||
320 | static int __init securityfs_init(void) | 320 | static int __init securityfs_init(void) |
321 | { | 321 | { |
322 | int retval; | 322 | int retval; |
323 | 323 | ||
324 | security_subsys.kobj.kset = &kernel_subsys; | 324 | security_kobj = kobject_create_and_add("security", &kernel_subsys.kobj); |
325 | retval = subsystem_register(&security_subsys); | 325 | if (!security_kobj) |
326 | if (retval) | 326 | return -EINVAL; |
327 | return retval; | ||
328 | 327 | ||
329 | retval = register_filesystem(&fs_type); | 328 | retval = register_filesystem(&fs_type); |
330 | if (retval) | 329 | if (retval) |
331 | subsystem_unregister(&security_subsys); | 330 | kobject_unregister(security_kobj); |
332 | return retval; | 331 | return retval; |
333 | } | 332 | } |
334 | 333 | ||