summaryrefslogtreecommitdiff
path: root/include/linux/init.h
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2002-12-02 11:19:50 -0500
committerLinus Torvalds <torvalds@home.transmeta.com>2002-12-02 11:19:50 -0500
commit35c8838f3ec342c5ded92fe1bf85bb03a781c0e5 (patch)
tree14d2ec95440e006b7683e770a3882904a3179c4b /include/linux/init.h
parent467578b996aca77ad96b13d0c475227cf7ee753a (diff)
Add __exit_p() to match existing __devexit_p().
This patch fixes de2104x net driver up by doing the following things: (1) add __exit_p() to <linux/init.h> (2) add the unused attributed to __exit routines for non-modules (3) use __exit_p() to refer to de_remove_one()
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index e2bf29a635bf..26a518d9cfc1 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -42,10 +42,15 @@
discard it in modules) */
#define __init __attribute__ ((__section__ (".init.text")))
#define __initdata __attribute__ ((__section__ (".init.data")))
-#define __exit __attribute__ ((__section__(".exit.text")))
#define __exitdata __attribute__ ((__section__(".exit.data")))
#define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit")))
+#ifdef MODULE
+#define __exit __attribute__ ((__section__(".exit.text")))
+#else
+#define __exit __attribute__ ((unused,__section__(".exit.text")))
+#endif
+
/* For assembly routines */
#define __INIT .section ".init.text","ax"
#define __FINIT .previous
@@ -185,4 +190,10 @@ extern struct kernel_param __setup_start, __setup_end;
#define __devexit_p(x) NULL
#endif
+#ifdef MODULE
+#define __exit_p(x) x
+#else
+#define __exit_p(x) NULL
+#endif
+
#endif /* _LINUX_INIT_H */