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

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

diff -u --recursive --new-file v2.3.12/linux/include/linux/module.h linux/include/linux/module.h
@@ -191,9 +191,10 @@
 /* Define the module variable, and usage macros.  */
 extern struct 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)
+#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)
 
 #ifndef __NO_VERSION__
 #include <linux/version.h>
@@ -215,6 +216,7 @@
 
 #ifndef __GENKSYMS__
 
+#define THIS_MODULE		NULL
 #define MOD_INC_USE_COUNT	do { } while (0)
 #define MOD_DEC_USE_COUNT	do { } while (0)
 #define MOD_IN_USE		1

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