diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-01 13:39:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:16 -0500 |
commit | 7405c1e15edfe43b137bfbc5882f1af34d6d414d (patch) | |
tree | 94093ac6ece6e0a33f504e6c7778a2c443dae958 /kernel/module.c | |
parent | 081248de0a0288a0ce4e1447a07ccf56aa4fae01 (diff) |
kset: convert /sys/module to use kset_create
Dynamically create the kset instead of declaring it statically. We also
rename module_subsys to module_kset to catch all users of the variable.
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 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c index 55142775c581..d03fcd9d652c 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -47,8 +47,6 @@ | |||
47 | #include <asm/cacheflush.h> | 47 | #include <asm/cacheflush.h> |
48 | #include <linux/license.h> | 48 | #include <linux/license.h> |
49 | 49 | ||
50 | extern int module_sysfs_initialized; | ||
51 | |||
52 | #if 0 | 50 | #if 0 |
53 | #define DEBUGP printk | 51 | #define DEBUGP printk |
54 | #else | 52 | #else |
@@ -1223,7 +1221,8 @@ int mod_sysfs_init(struct module *mod) | |||
1223 | err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); | 1221 | err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); |
1224 | if (err) | 1222 | if (err) |
1225 | goto out; | 1223 | goto out; |
1226 | mod->mkobj.kobj.kset = &module_subsys; | 1224 | mod->mkobj.kobj.kset = module_kset; |
1225 | mod->mkobj.kobj.ktype = &module_ktype; | ||
1227 | mod->mkobj.mod = mod; | 1226 | mod->mkobj.mod = mod; |
1228 | 1227 | ||
1229 | kobject_init(&mod->mkobj.kobj); | 1228 | kobject_init(&mod->mkobj.kobj); |
@@ -2539,7 +2538,7 @@ void module_add_driver(struct module *mod, struct device_driver *drv) | |||
2539 | struct kobject *mkobj; | 2538 | struct kobject *mkobj; |
2540 | 2539 | ||
2541 | /* Lookup built-in module entry in /sys/modules */ | 2540 | /* Lookup built-in module entry in /sys/modules */ |
2542 | mkobj = kset_find_obj(&module_subsys, drv->mod_name); | 2541 | mkobj = kset_find_obj(module_kset, drv->mod_name); |
2543 | if (mkobj) { | 2542 | if (mkobj) { |
2544 | mk = container_of(mkobj, struct module_kobject, kobj); | 2543 | mk = container_of(mkobj, struct module_kobject, kobj); |
2545 | /* remember our module structure */ | 2544 | /* remember our module structure */ |