patch-2.2.18 linux/include/linux/module.h

Next file: linux/include/linux/msdos_fs_sb.h
Previous file: linux/include/linux/mm.h
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/linux/module.h linux/include/linux/module.h
@@ -142,8 +142,11 @@
 #define __MODULE_STRING(x)	__MODULE_STRING_1(x)
 
 /* Find a symbol exported by the kernel or another module */
+#ifndef CONFIG_MODULES
+static inline unsigned long get_module_symbol(char *A, char *B) { return 0; };
+#else
 extern unsigned long get_module_symbol(char *, char *);
-
+#endif
 #if defined(MODULE) && !defined(__GENKSYMS__)
 
 /* Embedded module documentation macros.  */
@@ -195,6 +198,7 @@
 /* Define the module variable, and usage macros.  */
 extern struct module __this_module;
 
+#define THIS_MODULE		(&__this_module)
 #define MOD_INC_USE_COUNT	__MOD_INC_USE_COUNT(&__this_module)
 #define MOD_DEC_USE_COUNT	__MOD_DEC_USE_COUNT(&__this_module)
 #define MOD_IN_USE		__MOD_IN_USE(&__this_module)
@@ -216,6 +220,7 @@
 #define MODULE_SUPPORTED_DEVICE(name)
 #define MODULE_PARM(var,type)
 #define MODULE_PARM_DESC(var,desc)
+#define THIS_MODULE		NULL
 
 #ifndef __GENKSYMS__
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)