diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:54:54 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:54:54 -0400 |
| commit | fcda12e7f6d58d61997681a9d41779e3fd2ffc94 (patch) | |
| tree | ea865215c10b8b09828db2918013dfe02ce62f25 /include/linux | |
| parent | 5fabc487c96819dd12ddb9414835d170fd9cd6d5 (diff) | |
| parent | 62a2635610dbc83c5e8d724e00941eee4d18c186 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
modpost: Fix modpost's license checking V3
module: add /sys/module/<name>/uevent files
module: change attr callbacks to take struct module_kobject
modules: make arch's use default loader hooks
modules: add default loader hook implementations
param: fix return value handling in param_set_*
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/module.h | 24 | ||||
| -rw-r--r-- | include/linux/moduleloader.h | 7 |
2 files changed, 19 insertions, 12 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index d9ca2d5dc6d0..1c30087a2d81 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -48,10 +48,18 @@ struct modversion_info | |||
| 48 | 48 | ||
| 49 | struct module; | 49 | struct module; |
| 50 | 50 | ||
| 51 | struct module_kobject { | ||
| 52 | struct kobject kobj; | ||
| 53 | struct module *mod; | ||
| 54 | struct kobject *drivers_dir; | ||
| 55 | struct module_param_attrs *mp; | ||
| 56 | }; | ||
| 57 | |||
| 51 | struct module_attribute { | 58 | struct module_attribute { |
| 52 | struct attribute attr; | 59 | struct attribute attr; |
| 53 | ssize_t (*show)(struct module_attribute *, struct module *, char *); | 60 | ssize_t (*show)(struct module_attribute *, struct module_kobject *, |
| 54 | ssize_t (*store)(struct module_attribute *, struct module *, | 61 | char *); |
| 62 | ssize_t (*store)(struct module_attribute *, struct module_kobject *, | ||
| 55 | const char *, size_t count); | 63 | const char *, size_t count); |
| 56 | void (*setup)(struct module *, const char *); | 64 | void (*setup)(struct module *, const char *); |
| 57 | int (*test)(struct module *); | 65 | int (*test)(struct module *); |
| @@ -65,15 +73,9 @@ struct module_version_attribute { | |||
| 65 | } __attribute__ ((__aligned__(sizeof(void *)))); | 73 | } __attribute__ ((__aligned__(sizeof(void *)))); |
| 66 | 74 | ||
| 67 | extern ssize_t __modver_version_show(struct module_attribute *, | 75 | extern ssize_t __modver_version_show(struct module_attribute *, |
| 68 | struct module *, char *); | 76 | struct module_kobject *, char *); |
| 69 | 77 | ||
| 70 | struct module_kobject | 78 | extern struct module_attribute module_uevent; |
| 71 | { | ||
| 72 | struct kobject kobj; | ||
| 73 | struct module *mod; | ||
| 74 | struct kobject *drivers_dir; | ||
| 75 | struct module_param_attrs *mp; | ||
| 76 | }; | ||
| 77 | 79 | ||
| 78 | /* These are either module local, or the kernel's dummy ones. */ | 80 | /* These are either module local, or the kernel's dummy ones. */ |
| 79 | extern int init_module(void); | 81 | extern int init_module(void); |
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index c1f40c2f7ffb..b2be02ebf453 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h | |||
| @@ -5,7 +5,12 @@ | |||
| 5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
| 6 | #include <linux/elf.h> | 6 | #include <linux/elf.h> |
| 7 | 7 | ||
| 8 | /* These must be implemented by the specific architecture */ | 8 | /* These may be implemented by architectures that need to hook into the |
| 9 | * module loader code. Architectures that don't need to do anything special | ||
| 10 | * can just rely on the 'weak' default hooks defined in kernel/module.c. | ||
| 11 | * Note, however, that at least one of apply_relocate or apply_relocate_add | ||
| 12 | * must be implemented by each architecture. | ||
| 13 | */ | ||
| 9 | 14 | ||
| 10 | /* Adjust arch-specific sections. Return 0 on success. */ | 15 | /* Adjust arch-specific sections. Return 0 on success. */ |
| 11 | int module_frob_arch_sections(Elf_Ehdr *hdr, | 16 | int module_frob_arch_sections(Elf_Ehdr *hdr, |
