aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-10-29 15:13:17 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:11 -0500
commit3794491d0c4b6355c55b0379f003900e57666a97 (patch)
tree11ca4434fd718cd5fcde2b4916887f683ba50d33 /fs
parent191e186bd0589e28496745275157323a6f7902ca (diff)
kobject: convert configfs 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> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/configfs/mount.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c
index 374ddbd6648d..13300466464b 100644
--- a/fs/configfs/mount.c
+++ b/fs/configfs/mount.c
@@ -128,7 +128,7 @@ void configfs_release_fs(void)
128} 128}
129 129
130 130
131static decl_subsys(config, NULL); 131static struct kobject *config_kobj;
132 132
133static int __init configfs_init(void) 133static int __init configfs_init(void)
134{ 134{
@@ -140,9 +140,8 @@ static int __init configfs_init(void)
140 if (!configfs_dir_cachep) 140 if (!configfs_dir_cachep)
141 goto out; 141 goto out;
142 142
143 config_subsys.kobj.kset = &kernel_subsys; 143 config_kobj = kobject_create_and_add("config", &kernel_subsys.kobj);
144 err = subsystem_register(&config_subsys); 144 if (!config_kobj) {
145 if (err) {
146 kmem_cache_destroy(configfs_dir_cachep); 145 kmem_cache_destroy(configfs_dir_cachep);
147 configfs_dir_cachep = NULL; 146 configfs_dir_cachep = NULL;
148 goto out; 147 goto out;
@@ -151,7 +150,7 @@ static int __init configfs_init(void)
151 err = register_filesystem(&configfs_fs_type); 150 err = register_filesystem(&configfs_fs_type);
152 if (err) { 151 if (err) {
153 printk(KERN_ERR "configfs: Unable to register filesystem!\n"); 152 printk(KERN_ERR "configfs: Unable to register filesystem!\n");
154 subsystem_unregister(&config_subsys); 153 kobject_unregister(config_kobj);
155 kmem_cache_destroy(configfs_dir_cachep); 154 kmem_cache_destroy(configfs_dir_cachep);
156 configfs_dir_cachep = NULL; 155 configfs_dir_cachep = NULL;
157 goto out; 156 goto out;
@@ -160,7 +159,7 @@ static int __init configfs_init(void)
160 err = configfs_inode_init(); 159 err = configfs_inode_init();
161 if (err) { 160 if (err) {
162 unregister_filesystem(&configfs_fs_type); 161 unregister_filesystem(&configfs_fs_type);
163 subsystem_unregister(&config_subsys); 162 kobject_unregister(config_kobj);
164 kmem_cache_destroy(configfs_dir_cachep); 163 kmem_cache_destroy(configfs_dir_cachep);
165 configfs_dir_cachep = NULL; 164 configfs_dir_cachep = NULL;
166 } 165 }
@@ -171,7 +170,7 @@ out:
171static void __exit configfs_exit(void) 170static void __exit configfs_exit(void)
172{ 171{
173 unregister_filesystem(&configfs_fs_type); 172 unregister_filesystem(&configfs_fs_type);
174 subsystem_unregister(&config_subsys); 173 kobject_unregister(config_kobj);
175 kmem_cache_destroy(configfs_dir_cachep); 174 kmem_cache_destroy(configfs_dir_cachep);
176 configfs_dir_cachep = NULL; 175 configfs_dir_cachep = NULL;
177 configfs_inode_exit(); 176 configfs_inode_exit();