aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/module.h24
-rw-r--r--include/linux/moduleloader.h7
2 files changed, 19 insertions, 12 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index d9ca2d5dc6d..1c30087a2d8 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -48,10 +48,18 @@ struct modversion_info
48 48
49struct module; 49struct module;
50 50
51struct module_kobject {
52 struct kobject kobj;
53 struct module *mod;
54 struct kobject *drivers_dir;
55 struct module_param_attrs *mp;
56};
57
51struct module_attribute { 58struct 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
67extern ssize_t __modver_version_show(struct module_attribute *, 75extern ssize_t __modver_version_show(struct module_attribute *,
68 struct module *, char *); 76 struct module_kobject *, char *);
69 77
70struct module_kobject 78extern 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. */
79extern int init_module(void); 81extern int init_module(void);
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
index c1f40c2f7ff..b2be02ebf45 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. */
11int module_frob_arch_sections(Elf_Ehdr *hdr, 16int module_frob_arch_sections(Elf_Ehdr *hdr,