diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-06-23 10:07:34 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-06-23 10:07:34 -0400 |
commit | 1240e6b5532358257c52351639a8d2382fe58f84 (patch) | |
tree | 43d374ce976a41c6dcd12a70a51e0289093f8d07 /include/linux/module.h | |
parent | c9ff921abecda352e987a6aae169118a3fc9aa5d (diff) | |
parent | a5c7d797dcce3be5e77cd6ea62cc4920ededc32b (diff) |
Merge branch 'fix/misc' into topic/misc
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) |