diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2008-03-13 05:03:44 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-01 07:14:59 -0400 |
| commit | a58730c42174672fe0012a4edbe3e38f94ef2bad (patch) | |
| tree | 6cd01098614ea8fc00f5eba462a208cc5a038d2a | |
| parent | e4c576b911e364737b1bf4f5bfdab1c440713f26 (diff) | |
module: make module_sect_attrs private to kernel/module.c
No-one else is using these afaics.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| -rw-r--r-- | include/linux/module.h | 17 | ||||
| -rw-r--r-- | kernel/module.c | 16 |
2 files changed, 15 insertions, 18 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 819c4e889bf1..a29c2ebb7c38 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -229,23 +229,6 @@ enum module_state | |||
| 229 | MODULE_STATE_GOING, | 229 | MODULE_STATE_GOING, |
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | /* Similar stuff for section attributes. */ | ||
| 233 | struct module_sect_attr | ||
| 234 | { | ||
| 235 | struct module_attribute mattr; | ||
| 236 | char *name; | ||
| 237 | unsigned long address; | ||
| 238 | }; | ||
| 239 | |||
| 240 | struct module_sect_attrs | ||
| 241 | { | ||
| 242 | struct attribute_group grp; | ||
| 243 | int nsections; | ||
| 244 | struct module_sect_attr attrs[0]; | ||
| 245 | }; | ||
| 246 | |||
| 247 | struct module_param_attrs; | ||
| 248 | |||
| 249 | struct module | 232 | struct module |
| 250 | { | 233 | { |
| 251 | enum module_state state; | 234 | enum module_state state; |
diff --git a/kernel/module.c b/kernel/module.c index 8d6cccc6c3cf..b0d7c2a41bd9 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -991,6 +991,20 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, | |||
| 991 | * J. Corbet <corbet@lwn.net> | 991 | * J. Corbet <corbet@lwn.net> |
| 992 | */ | 992 | */ |
| 993 | #if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS) | 993 | #if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS) |
| 994 | struct module_sect_attr | ||
| 995 | { | ||
| 996 | struct module_attribute mattr; | ||
| 997 | char *name; | ||
| 998 | unsigned long address; | ||
| 999 | }; | ||
| 1000 | |||
| 1001 | struct module_sect_attrs | ||
| 1002 | { | ||
| 1003 | struct attribute_group grp; | ||
| 1004 | unsigned int nsections; | ||
| 1005 | struct module_sect_attr attrs[0]; | ||
| 1006 | }; | ||
| 1007 | |||
| 994 | static ssize_t module_sect_show(struct module_attribute *mattr, | 1008 | static ssize_t module_sect_show(struct module_attribute *mattr, |
| 995 | struct module *mod, char *buf) | 1009 | struct module *mod, char *buf) |
| 996 | { | 1010 | { |
| @@ -1001,7 +1015,7 @@ static ssize_t module_sect_show(struct module_attribute *mattr, | |||
| 1001 | 1015 | ||
| 1002 | static void free_sect_attrs(struct module_sect_attrs *sect_attrs) | 1016 | static void free_sect_attrs(struct module_sect_attrs *sect_attrs) |
| 1003 | { | 1017 | { |
| 1004 | int section; | 1018 | unsigned int section; |
| 1005 | 1019 | ||
| 1006 | for (section = 0; section < sect_attrs->nsections; section++) | 1020 | for (section = 0; section < sect_attrs->nsections; section++) |
| 1007 | kfree(sect_attrs->attrs[section].name); | 1021 | kfree(sect_attrs->attrs[section].name); |
