summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 4c9b53d5d51c..0a86652fb1cb 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -70,6 +70,7 @@ static const char __module_cat(name,__LINE__)[] \
extern const struct gtype##_id __mod_##gtype##_table \
__attribute__ ((unused, alias(__stringify(name))))
+extern struct module __this_module;
#define THIS_MODULE (&__this_module)
#else /* !MODULE */
@@ -481,21 +482,6 @@ static inline int unregister_module_notifier(struct notifier_block * nb)
#endif /* CONFIG_MODULES */
-#ifdef MODULE
-extern struct module __this_module;
-#ifdef KBUILD_MODNAME
-/* We make the linker do some of the work. */
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = __stringify(KBUILD_MODNAME),
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
-};
-#endif /* KBUILD_MODNAME */
-#endif /* MODULE */
-
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */