diff options
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index eaf60ff9ba94..f520a767c86c 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include <linux/stringify.h> | 15 | #include <linux/stringify.h> |
| 16 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
| 17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
| 18 | #include <linux/tracepoint.h> | 18 | #include <linux/jump_label.h> |
| 19 | #include <linux/export.h> | 19 | #include <linux/export.h> |
| 20 | 20 | ||
| 21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
| @@ -82,15 +82,6 @@ void sort_extable(struct exception_table_entry *start, | |||
| 82 | void sort_main_extable(void); | 82 | void sort_main_extable(void); |
| 83 | void trim_init_extable(struct module *m); | 83 | void trim_init_extable(struct module *m); |
| 84 | 84 | ||
| 85 | #ifdef MODULE | ||
| 86 | #define MODULE_GENERIC_TABLE(gtype, name) \ | ||
| 87 | extern const struct gtype##_id __mod_##gtype##_table \ | ||
| 88 | __attribute__ ((unused, alias(__stringify(name)))) | ||
| 89 | |||
| 90 | #else /* !MODULE */ | ||
| 91 | #define MODULE_GENERIC_TABLE(gtype, name) | ||
| 92 | #endif | ||
| 93 | |||
| 94 | /* Generic info of form tag = "info" */ | 85 | /* Generic info of form tag = "info" */ |
| 95 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) | 86 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) |
| 96 | 87 | ||
| @@ -141,8 +132,14 @@ extern const struct gtype##_id __mod_##gtype##_table \ | |||
| 141 | /* What your module does. */ | 132 | /* What your module does. */ |
| 142 | #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) | 133 | #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) |
| 143 | 134 | ||
| 144 | #define MODULE_DEVICE_TABLE(type, name) \ | 135 | #ifdef MODULE |
| 145 | MODULE_GENERIC_TABLE(type##_device, name) | 136 | /* Creates an alias so file2alias.c can find device table. */ |
| 137 | #define MODULE_DEVICE_TABLE(type, name) \ | ||
| 138 | extern const struct type##_device_id __mod_##type##__##name##_device_table \ | ||
| 139 | __attribute__ ((unused, alias(__stringify(name)))) | ||
| 140 | #else /* !MODULE */ | ||
| 141 | #define MODULE_DEVICE_TABLE(type, name) | ||
| 142 | #endif | ||
| 146 | 143 | ||
| 147 | /* Version of form [<epoch>:]<version>[-<extra-version>]. | 144 | /* Version of form [<epoch>:]<version>[-<extra-version>]. |
| 148 | * Or for CVS/RCS ID version, everything but the number is stripped. | 145 | * Or for CVS/RCS ID version, everything but the number is stripped. |
