aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c6
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
2527void module_add_driver(struct module *mod, struct device_driver *drv) 2527void module_add_driver(struct module *mod, struct device_driver *drv)