diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-10-22 11:00:22 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-10-21 19:00:23 -0400 |
commit | 9b473de87209fa86eb421b23386693b461612f30 (patch) | |
tree | 7fe30a3f37347d5bb6f2ade2cc09133ae158ea3d /include | |
parent | 730b69d225259565c705f5f5a11cb1aba69568f1 (diff) |
param: Fix duplicate module prefixes
Instead of insisting each new module_param sysfs entry is unique,
handle the case where it already exists (for builtin modules).
The current code assumes that all identical prefixes are together in
the section: true for normal uses, but not necessarily so if someone
overrides MODULE_PARAM_PREFIX. More importantly, it's not true with
the new "core_param()" code which uses "kernel" as a prefix.
This simplifies the caller for the builtin case, at a slight loss of
efficiency (we do the lookup every time to see if the directory
exists).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/module.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 196b499270da..3bfed013350b 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -60,6 +60,7 @@ struct module_kobject | |||
60 | struct kobject kobj; | 60 | struct kobject kobj; |
61 | struct module *mod; | 61 | struct module *mod; |
62 | struct kobject *drivers_dir; | 62 | struct kobject *drivers_dir; |
63 | struct module_param_attrs *mp; | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | /* These are either module local, or the kernel's dummy ones. */ | 66 | /* These are either module local, or the kernel's dummy ones. */ |
@@ -242,7 +243,6 @@ struct module | |||
242 | 243 | ||
243 | /* Sysfs stuff. */ | 244 | /* Sysfs stuff. */ |
244 | struct module_kobject mkobj; | 245 | struct module_kobject mkobj; |
245 | struct module_param_attrs *param_attrs; | ||
246 | struct module_attribute *modinfo_attrs; | 246 | struct module_attribute *modinfo_attrs; |
247 | const char *version; | 247 | const char *version; |
248 | const char *srcversion; | 248 | const char *srcversion; |