Commit cff26a51 authored by Rusty Russell's avatar Rusty Russell

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 21bdd17b
...@@ -56,10 +56,6 @@ ...@@ -56,10 +56,6 @@
#define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \ #define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \
{ .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) } { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) }
/* export used IDs outside module */
#define ISAPNP_CARD_TABLE(name) \
MODULE_GENERIC_TABLE(isapnp_card, name)
struct isapnp_card_id { struct isapnp_card_id {
unsigned long driver_data; /* data private to the driver */ unsigned long driver_data; /* data private to the driver */
unsigned short card_vendor, card_device; unsigned short card_vendor, card_device;
......
...@@ -82,15 +82,6 @@ void sort_extable(struct exception_table_entry *start, ...@@ -82,15 +82,6 @@ void sort_extable(struct exception_table_entry *start,
void sort_main_extable(void); void sort_main_extable(void);
void trim_init_extable(struct module *m); void trim_init_extable(struct module *m);
#ifdef MODULE
#define MODULE_GENERIC_TABLE(gtype, name) \
extern const struct gtype##_id __mod_##gtype##_table \
__attribute__ ((unused, alias(__stringify(name))))
#else /* !MODULE */
#define MODULE_GENERIC_TABLE(gtype, name)
#endif
/* Generic info of form tag = "info" */ /* Generic info of form tag = "info" */
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
...@@ -141,8 +132,14 @@ extern const struct gtype##_id __mod_##gtype##_table \ ...@@ -141,8 +132,14 @@ extern const struct gtype##_id __mod_##gtype##_table \
/* What your module does. */ /* What your module does. */
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
#define MODULE_DEVICE_TABLE(type, name) \ #ifdef MODULE
MODULE_GENERIC_TABLE(type##__##name##_device, name) /* Creates an alias so file2alias.c can find device table. */
#define MODULE_DEVICE_TABLE(type, name) \
extern const struct type##_device_id __mod_##type##__##name##_device_table \
__attribute__ ((unused, alias(__stringify(name))))
#else /* !MODULE */
#define MODULE_DEVICE_TABLE(type, name)
#endif
/* Version of form [<epoch>:]<version>[-<extra-version>]. /* Version of form [<epoch>:]<version>[-<extra-version>].
* Or for CVS/RCS ID version, everything but the number is stripped. * Or for CVS/RCS ID version, everything but the number is stripped.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment