summaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-01-15 20:22:02 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 10:37:12 -0800
commitf30c53a873d0d227493197064b8886af2d57bbd6 (patch)
treecd051f14effbbb015a1bae6fe5bfabcf14037f13 /kernel/params.c
parentc744aeae9d173a953b771a7ad5c872f91fa99dec (diff)
downloadlinux-f30c53a873d0d227493197064b8886af2d57bbd6.tar.bz2
MODULES: add the module name for built in kernel drivers
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 718945da8f58..737b7c5e93aa 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -561,14 +561,12 @@ static void __init kernel_param_sysfs_setup(const char *name,
mk->mod = THIS_MODULE;
kobj_set_kset_s(mk, module_subsys);
kobject_set_name(&mk->kobj, name);
- ret = kobject_register(&mk->kobj);
+ kobject_init(&mk->kobj);
+ ret = kobject_add(&mk->kobj);
BUG_ON(ret < 0);
-
- /* no need to keep the kobject if no parameter is exported */
- if (!param_sysfs_setup(mk, kparam, num_params, name_skip)) {
- kobject_unregister(&mk->kobj);
- kfree(mk);
- }
+ param_sysfs_setup(mk, kparam, num_params, name_skip);
+ mk->drivers_dir = kobject_add_dir(&mk->kobj, "drivers");
+ kobject_uevent(&mk->kobj, KOBJ_ADD);
}
/*