|
33 | 33 | #include <linux/percpu.h> |
34 | 34 | #include <asm/module.h> |
35 | 35 |
|
36 | | -#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN |
| 36 | +#define MODULE_NAME_LEN __MODULE_NAME_LEN |
37 | 37 |
|
38 | 38 | struct modversion_info { |
39 | 39 | unsigned long crc; |
@@ -303,23 +303,6 @@ static typeof(name) __mod_device_table__##type##__##name \ |
303 | 303 |
|
304 | 304 | struct notifier_block; |
305 | 305 |
|
306 | | -#ifdef CONFIG_MODULES |
307 | | - |
308 | | -/* Get/put a kernel symbol (calls must be symmetric) */ |
309 | | -void *__symbol_get(const char *symbol); |
310 | | -void *__symbol_get_gpl(const char *symbol); |
311 | | -#define symbol_get(x) ({ \ |
312 | | - static const char __notrim[] \ |
313 | | - __used __section(".no_trim_symbol") = __stringify(x); \ |
314 | | - (typeof(&x))(__symbol_get(__stringify(x))); }) |
315 | | - |
316 | | -/* modules using other modules: kdb wants to see this. */ |
317 | | -struct module_use { |
318 | | - struct list_head source_list; |
319 | | - struct list_head target_list; |
320 | | - struct module *source, *target; |
321 | | -}; |
322 | | - |
323 | 306 | enum module_state { |
324 | 307 | MODULE_STATE_LIVE, /* Normal state. */ |
325 | 308 | MODULE_STATE_COMING, /* Full formed, running module_init. */ |
@@ -604,6 +587,16 @@ struct module { |
604 | 587 | #define MODULE_ARCH_INIT {} |
605 | 588 | #endif |
606 | 589 |
|
| 590 | +#ifdef CONFIG_MODULES |
| 591 | + |
| 592 | +/* Get/put a kernel symbol (calls must be symmetric) */ |
| 593 | +void *__symbol_get(const char *symbol); |
| 594 | +void *__symbol_get_gpl(const char *symbol); |
| 595 | +#define symbol_get(x) ({ \ |
| 596 | + static const char __notrim[] \ |
| 597 | + __used __section(".no_trim_symbol") = __stringify(x); \ |
| 598 | + (typeof(&x))(__symbol_get(__stringify(x))); }) |
| 599 | + |
607 | 600 | #ifndef HAVE_ARCH_KALLSYMS_SYMBOL_VALUE |
608 | 601 | static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym) |
609 | 602 | { |
|
0 commit comments