summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-10-22 19:00:22 +0400
committerRusty Russell <rusty@rustcorp.com.au>2008-10-22 03:00:23 +0400
commit9b473de87209fa86eb421b23386693b461612f30 (patch)
tree7fe30a3f37347d5bb6f2ade2cc09133ae158ea3d /include/linux
parent730b69d225259565c705f5f5a11cb1aba69568f1 (diff)
downloadlinux-9b473de87209fa86eb421b23386693b461612f30.tar.xz
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/linux')
-rw-r--r--include/linux/module.h2
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
struct kobject kobj;
struct module *mod;
struct kobject *drivers_dir;
+ struct module_param_attrs *mp;
};
/* These are either module local, or the kernel's dummy ones. */
@@ -242,7 +243,6 @@ struct module
/* Sysfs stuff. */
struct module_kobject mkobj;
- struct module_param_attrs *param_attrs;
struct module_attribute *modinfo_attrs;
const char *version;
const char *srcversion;