[PATCH 06/54] kset: convert securityfs to use kset_create

Greg Kroah-Hartman
2007-11-03T00:01:53Z

Dynamically create the kset instead of declaring it statically.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
security/inode.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/security/inode.c b/security/inode.c
index 9e42f5f..9071d81 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -315,20 +315,20 @@ void securityfs_remove(struct dentry *dentry)
}
EXPORT_SYMBOL_GPL(securityfs_remove);

-static decl_subsys(security, NULL);
+static struct kset *security_kset;

static int __init securityfs_init(void)
{
int retval;

- security_subsys.kobj.kset = &kernel_subsys;
- retval = subsystem_register(&security_subsys);
- if (retval)
- return retval;
+ security_kset = kset_create_and_register("security", NULL, NULL,
+ &kernel_subsys);
+ if (IS_ERR(security_kset))
+ return PTR_ERR(security_kset);

retval = register_filesystem(&fs_type);
if (retval)
- subsystem_unregister(&security_subsys);
+ kset_unregister(security_kset);
return retval;
}

--
1.5.3.4