patch-2.3.40 linux/include/linux/init.h
Next file: linux/include/linux/input.h
Previous file: linux/include/linux/ide.h
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Thu Jan 20 16:05:29 2000
- Orig file:
v2.3.39/linux/include/linux/init.h
- Orig date:
Tue Jan 4 13:57:21 2000
diff -u --recursive --new-file v2.3.39/linux/include/linux/init.h linux/include/linux/init.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_INIT_H
#define _LINUX_INIT_H
+#include <linux/config.h>
+
/* These macros are used to mark some functions or
* initialized data (doesn't apply to uninitialized data)
* as `initialization' functions. The kernel can take this
@@ -68,9 +70,9 @@
* or exit time.
*/
#define __init __attribute__ ((__section__ (".text.init")))
-#define __exit __attribute__ ((unused, __section__(".text.init")))
+#define __exit __attribute__ ((unused, __section__(".text.exit")))
#define __initdata __attribute__ ((__section__ (".data.init")))
-#define __exitdata __attribute__ ((unused, __section__ (".data.init")))
+#define __exitdata __attribute__ ((unused, __section__ (".data.exit")))
#define __initsetup __attribute__ ((unused,__section__ (".setup.init")))
#define __init_call __attribute__ ((unused,__section__ (".initcall.init")))
@@ -111,6 +113,18 @@
#define __initlocaldata __initdata
#else
#define __initlocaldata
+#endif
+
+#ifdef CONFIG_HOTPLUG
+#define __devinit
+#define __devinitdata
+#define __devexit
+#define __devexitdata
+#else
+#define __devinit __init
+#define __devinitdata __initdata
+#define __devexit __exit
+#define __devexitdata __exitdata
#endif
#endif /* _LINUX_INIT_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)