diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-06-22 14:32:04 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-06-22 14:32:04 -0400 |
| commit | 0e789314f8c0b50bd19bf08dc5624b9604d60183 (patch) | |
| tree | 64b6b9655e944284937f5eeff643f0754f35d0af /include/linux/module.h | |
| parent | f5dec51172b81db226a23f309bc737ad021af35b (diff) | |
| parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) | |
Merge commit 'v2.6.35-rc3' into for-linus
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 6914fcad4673..8a6b9fdc7ffa 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -181,6 +181,13 @@ void *__symbol_get(const char *symbol); | |||
| 181 | void *__symbol_get_gpl(const char *symbol); | 181 | void *__symbol_get_gpl(const char *symbol); |
| 182 | #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) | 182 | #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) |
| 183 | 183 | ||
| 184 | /* modules using other modules: kdb wants to see this. */ | ||
| 185 | struct module_use { | ||
| 186 | struct list_head source_list; | ||
| 187 | struct list_head target_list; | ||
| 188 | struct module *source, *target; | ||
| 189 | }; | ||
| 190 | |||
| 184 | #ifndef __GENKSYMS__ | 191 | #ifndef __GENKSYMS__ |
| 185 | #ifdef CONFIG_MODVERSIONS | 192 | #ifdef CONFIG_MODVERSIONS |
| 186 | /* Mark the CRC weak since genksyms apparently decides not to | 193 | /* Mark the CRC weak since genksyms apparently decides not to |
| @@ -359,7 +366,9 @@ struct module | |||
| 359 | 366 | ||
| 360 | #ifdef CONFIG_MODULE_UNLOAD | 367 | #ifdef CONFIG_MODULE_UNLOAD |
| 361 | /* What modules depend on me? */ | 368 | /* What modules depend on me? */ |
| 362 | struct list_head modules_which_use_me; | 369 | struct list_head source_list; |
| 370 | /* What modules do I depend on? */ | ||
| 371 | struct list_head target_list; | ||
| 363 | 372 | ||
| 364 | /* Who is waiting for us to be unloaded */ | 373 | /* Who is waiting for us to be unloaded */ |
| 365 | struct task_struct *waiter; | 374 | struct task_struct *waiter; |
| @@ -663,43 +672,10 @@ static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter) | |||
| 663 | 672 | ||
| 664 | #endif /* CONFIG_MODULES */ | 673 | #endif /* CONFIG_MODULES */ |
| 665 | 674 | ||
| 666 | struct device_driver; | ||
| 667 | #ifdef CONFIG_SYSFS | 675 | #ifdef CONFIG_SYSFS |
| 668 | struct module; | ||
| 669 | |||
| 670 | extern struct kset *module_kset; | 676 | extern struct kset *module_kset; |
| 671 | extern struct kobj_type module_ktype; | 677 | extern struct kobj_type module_ktype; |
| 672 | extern int module_sysfs_initialized; | 678 | extern int module_sysfs_initialized; |
| 673 | |||
| 674 | int mod_sysfs_init(struct module *mod); | ||
| 675 | int mod_sysfs_setup(struct module *mod, | ||
| 676 | struct kernel_param *kparam, | ||
| 677 | unsigned int num_params); | ||
| 678 | int module_add_modinfo_attrs(struct module *mod); | ||
| 679 | void module_remove_modinfo_attrs(struct module *mod); | ||
| 680 | |||
| 681 | #else /* !CONFIG_SYSFS */ | ||
| 682 | |||
| 683 | static inline int mod_sysfs_init(struct module *mod) | ||
| 684 | { | ||
| 685 | return 0; | ||
| 686 | } | ||
| 687 | |||
| 688 | static inline int mod_sysfs_setup(struct module *mod, | ||
| 689 | struct kernel_param *kparam, | ||
| 690 | unsigned int num_params) | ||
| 691 | { | ||
| 692 | return 0; | ||
| 693 | } | ||
| 694 | |||
| 695 | static inline int module_add_modinfo_attrs(struct module *mod) | ||
| 696 | { | ||
| 697 | return 0; | ||
| 698 | } | ||
| 699 | |||
| 700 | static inline void module_remove_modinfo_attrs(struct module *mod) | ||
| 701 | { } | ||
| 702 | |||
| 703 | #endif /* CONFIG_SYSFS */ | 679 | #endif /* CONFIG_SYSFS */ |
| 704 | 680 | ||
| 705 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) | 681 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) |
