aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-01-15 14:22:02 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 13:37:12 -0500
commitf30c53a873d0d227493197064b8886af2d57bbd6 (patch)
treecd051f14effbbb015a1bae6fe5bfabcf14037f13 /kernel/params.c
parentc744aeae9d173a953b771a7ad5c872f91fa99dec (diff)
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,
561 mk->mod = THIS_MODULE; 561 mk->mod = THIS_MODULE;
562 kobj_set_kset_s(mk, module_subsys); 562 kobj_set_kset_s(mk, module_subsys);
563 kobject_set_name(&mk->kobj, name); 563 kobject_set_name(&mk->kobj, name);
564 ret = kobject_register(&mk->kobj); 564 kobject_init(&mk->kobj);
565 ret = kobject_add(&mk->kobj);
565 BUG_ON(ret < 0); 566 BUG_ON(ret < 0);
566 567 param_sysfs_setup(mk, kparam, num_params, name_skip);
567 /* no need to keep the kobject if no parameter is exported */ 568 mk->drivers_dir = kobject_add_dir(&mk->kobj, "drivers");
568 if (!param_sysfs_setup(mk, kparam, num_params, name_skip)) { 569 kobject_uevent(&mk->kobj, KOBJ_ADD);
569 kobject_unregister(&mk->kobj);
570 kfree(mk);
571 }
572} 570}
573 571
574/* 572/*