patch-2.1.36 linux/include/linux/init.h

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

diff -u --recursive --new-file v2.1.35/linux/include/linux/init.h linux/include/linux/init.h
@@ -30,6 +30,22 @@
  * static char linux_logo[] __initdata = { 0x32, 0x36, ... };
  */
 
+/*
+ * Disable the __initfunc macros if a file that is a part of a
+ * module attempts to use them. We do not want to interfere
+ * with module linking.
+ */
+
+#ifndef MODULE
 #include <asm/init.h>
+#else
+#define __init
+#define __initdata
+#define __initfunc(__arginit) __arginit
+/* For assembly routines */
+#define __INIT
+#define __FINIT
+#define __INITDATA
+#endif
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov