diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-06 01:24:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:11 -0500 |
commit | 4ff6abff832fbc6cb1d769f6106c841bc2b09f63 (patch) | |
tree | 8458c8e29f53b67912edbe2424e43f95556832ce /kernel/module.c | |
parent | 3f9e3ee9dc3605e5c593b5d708494571fb0d3970 (diff) |
kobject: get rid of kobject_add_dir
kobject_create_and_add is the same as kobject_add_dir, so drop
kobject_add_dir.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c index 68df79738b3b..55142775c581 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1122,7 +1122,7 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect, | |||
1122 | ++loaded; | 1122 | ++loaded; |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | notes_attrs->dir = kobject_add_dir(&mod->mkobj.kobj, "notes"); | 1125 | notes_attrs->dir = kobject_create_and_add("notes", &mod->mkobj.kobj); |
1126 | if (!notes_attrs->dir) | 1126 | if (!notes_attrs->dir) |
1127 | goto out; | 1127 | goto out; |
1128 | 1128 | ||
@@ -1243,7 +1243,7 @@ int mod_sysfs_setup(struct module *mod, | |||
1243 | if (err) | 1243 | if (err) |
1244 | goto out; | 1244 | goto out; |
1245 | 1245 | ||
1246 | mod->holders_dir = kobject_add_dir(&mod->mkobj.kobj, "holders"); | 1246 | mod->holders_dir = kobject_create_and_add("holders", &mod->mkobj.kobj); |
1247 | if (!mod->holders_dir) { | 1247 | if (!mod->holders_dir) { |
1248 | err = -ENOMEM; | 1248 | err = -ENOMEM; |
1249 | goto out_unreg; | 1249 | goto out_unreg; |
@@ -2521,7 +2521,7 @@ static void module_create_drivers_dir(struct module_kobject *mk) | |||
2521 | if (!mk || mk->drivers_dir) | 2521 | if (!mk || mk->drivers_dir) |
2522 | return; | 2522 | return; |
2523 | 2523 | ||
2524 | mk->drivers_dir = kobject_add_dir(&mk->kobj, "drivers"); | 2524 | mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); |
2525 | } | 2525 | } |
2526 | 2526 | ||
2527 | void module_add_driver(struct module *mod, struct device_driver *drv) | 2527 | void module_add_driver(struct module *mod, struct device_driver *drv) |