projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5815dd
)
Kobject: convert kernel/params.c to use kobject_init/add_ng()
author
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 18 Dec 2007 06:05:35 +0000
(23:05 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 25 Jan 2008 04:40:31 +0000
(20:40 -0800)
This converts the code to use the new kobject functions, cleaning up the
logic in doing so.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/params.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/params.c
b/kernel/params.c
index 97e092312155b406634579af4942d38ff81a2d8b..1078b148ca80f9d88eaf0da2f3157386ae31ff3a 100644
(file)
--- a/
kernel/params.c
+++ b/
kernel/params.c
@@
-561,11
+561,9
@@
static void __init kernel_param_sysfs_setup(const char *name,
mk->mod = THIS_MODULE;
mk->kobj.kset = module_kset;
- mk->kobj.ktype = &module_ktype;
- kobject_set_name(&mk->kobj, name);
- kobject_init(&mk->kobj);
- ret = kobject_add(&mk->kobj);
+ ret = kobject_init_and_add(&mk->kobj, &module_ktype, NULL, "%s", name);
if (ret) {
+ kobject_put(&mk->kobj);
printk(KERN_ERR "Module '%s' failed to be added to sysfs, "
"error number %d\n", name, ret);
printk(KERN_ERR "The system will be unstable now.\n");