diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-02-02 19:45:13 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-03-12 21:41:00 -0400 |
commit | cff26a51da5d206d3baf871e75778da44710219d (patch) | |
tree | 7a2fb0e8338ea79cd735b927add6bb2908ca23b3 /include/linux/module.h | |
parent | 21bdd17b21b45ea48e06e23918d681afbe0622e9 (diff) |
module: remove MODULE_GENERIC_TABLE
MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the
work directly. This also removes a wart introduced in the last patch,
where the alias is defined to be an unknown struct type "struct
type##__##name##_device_id" instead of "struct type##_device_id" (it's
an extern so GCC doesn't care, but it's wrong).
The other user of MODULE_GENERIC_TABLE (ISAPNP_CARD_TABLE) is unused,
so delete it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index ad18f6006f86..5686b37e11d6 100644 --- a/include/linux/module.h +++ b/include/linux/module.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##__##name##_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. |