diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-01-15 19:22:02 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:37:12 (GMT) |
commit | f30c53a873d0d227493197064b8886af2d57bbd6 (patch) | |
tree | cd051f14effbbb015a1bae6fe5bfabcf14037f13 /kernel/params.c | |
parent | c744aeae9d173a953b771a7ad5c872f91fa99dec (diff) | |
download | linux-fsl-qoriq-f30c53a873d0d227493197064b8886af2d57bbd6.tar.xz |
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.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/params.c b/kernel/params.c index 718945d..737b7c5 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); } /* |