Commit 35c8838f authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

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()
parent 467578b9
...@@ -2217,8 +2217,7 @@ static struct pci_driver de_driver = { ...@@ -2217,8 +2217,7 @@ static struct pci_driver de_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = de_pci_tbl, .id_table = de_pci_tbl,
.probe = de_init_one, .probe = de_init_one,
#warning only here to fix build. should be __exit_p not __devexit_p. .remove = __exit_p(de_remove_one),
.remove = __devexit_p(de_remove_one),
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = de_suspend, .suspend = de_suspend,
.resume = de_resume, .resume = de_resume,
......
...@@ -42,10 +42,15 @@ ...@@ -42,10 +42,15 @@
discard it in modules) */ discard it in modules) */
#define __init __attribute__ ((__section__ (".init.text"))) #define __init __attribute__ ((__section__ (".init.text")))
#define __initdata __attribute__ ((__section__ (".init.data"))) #define __initdata __attribute__ ((__section__ (".init.data")))
#define __exit __attribute__ ((__section__(".exit.text")))
#define __exitdata __attribute__ ((__section__(".exit.data"))) #define __exitdata __attribute__ ((__section__(".exit.data")))
#define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit"))) #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 */ /* For assembly routines */
#define __INIT .section ".init.text","ax" #define __INIT .section ".init.text","ax"
#define __FINIT .previous #define __FINIT .previous
...@@ -185,4 +190,10 @@ extern struct kernel_param __setup_start, __setup_end; ...@@ -185,4 +190,10 @@ extern struct kernel_param __setup_start, __setup_end;
#define __devexit_p(x) NULL #define __devexit_p(x) NULL
#endif #endif
#ifdef MODULE
#define __exit_p(x) x
#else
#define __exit_p(x) NULL
#endif
#endif /* _LINUX_INIT_H */ #endif /* _LINUX_INIT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment