diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2002-11-19 17:31:18 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-19 17:31:18 -0800 |
| commit | 5c0f111ca088a1a9dbfe6717610cb21711831359 (patch) | |
| tree | 8a75f51d4f57832e726e6ff55e5067adb6bf5ed5 /include/linux | |
| parent | 8f79cdb7227c2aeaeb11d12ea70c73f444778695 (diff) | |
[PATCH] module device table restoration
Patch from Adam Richter. I have a nicer solution based on aliases, but
it requires coordination with USB, PCI and PCMCIA maintainers, which is
taking time.
This restores the old code in the meantime: one week without this is too
long for people who need it.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/module.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 47ff2bc63e33..927341a26c0e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -28,8 +28,6 @@ #define MODULE_AUTHOR(name) #define MODULE_DESCRIPTION(desc) #define MODULE_SUPPORTED_DEVICE(name) -#define MODULE_GENERIC_TABLE(gtype,name) -#define MODULE_DEVICE_TABLE(type,name) #define MODULE_PARM_DESC(var,desc) #define print_modules() @@ -41,14 +39,28 @@ struct kernel_symbol }; #ifdef MODULE + +#define MODULE_GENERIC_TABLE(gtype,name) \ +static const unsigned long __module_##gtype##_size \ + __attribute__ ((unused)) = sizeof(struct gtype##_id); \ +static const struct gtype##_id * __module_##gtype##_table \ + __attribute__ ((unused)) = name + /* This is magically filled in by the linker, but THIS_MODULE must be a constant so it works in initializers. */ extern struct module __this_module; #define THIS_MODULE (&__this_module) -#else + +#else /* !MODULE */ + +#define MODULE_GENERIC_TABLE(gtype,name) #define THIS_MODULE ((struct module *)0) + #endif +#define MODULE_DEVICE_TABLE(type,name) \ + MODULE_GENERIC_TABLE(type##_device,name) + struct kernel_symbol_group { /* Links us into the global symbol list */ |
