lkml.org 
[lkml]   [2008]   [Jan]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromGreg Kroah-Hartman <>
Subject[PATCH 049/196] kobject: convert securityfs to use kobject_create
DateThu, 24 Jan 2008 23:09:47 -0800
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>
---
 security/inode.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/security/inode.c b/security/inode.c
index 9e42f5f..dfc5978 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -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;
 }
 
-- 
1.5.3.8


\
 
 \ /
  Last update: 2008-01-25 08:35    [from the cache]
©2003-2008