This patch fixes tulip up by doing the following things: (1) add __exit_p() to (2) add the unused attributed to __exit routines for non-modules (3) use __exit_p() to refer to de_remove_one() (4) remove redundant timer initialization preceding variable initialization drivers/net/tulip/de2104x.c | 4 +--- include/linux/init.h | 13 ++++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) --- linux-2.5.49-mm1/include/linux/init.h Fri Nov 22 13:40:14 2002 +++ linux-2.5.49-mm2/include/linux/init.h Wed Nov 27 15:32:17 2002 @@ -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 @@ -199,6 +204,12 @@ extern struct kernel_param __setup_start #define __devexit_p(x) x #else #define __devexit_p(x) NULL +#endif + +#ifdef MODULE +#define __exit_p(x) x +#else +#define __exit_p(x) NULL #endif #endif /* _LINUX_INIT_H */ --- linux-2.5.49-mm1/drivers/net/tulip/de2104x.c Fri Nov 22 13:40:56 2002 +++ linux-2.5.49-mm2/drivers/net/tulip/de2104x.c Wed Nov 27 14:31:11 2002 @@ -2014,7 +2014,6 @@ static int __init de_init_one (struct pc dev->watchdog_timeo = TX_TIMEOUT; dev->irq = pdev->irq; - init_timer(&de->media_timer); de = dev->priv; de->de21040 = ent->driver_data == 0 ? 1 : 0; @@ -2217,8 +2216,7 @@ static struct pci_driver de_driver = { .name = DRV_NAME, .id_table = de_pci_tbl, .probe = de_init_one, -#warning only here to fix build. should be __exit_p not __devexit_p. - .remove = __devexit_p(de_remove_one), + .remove = __exit_p(de_remove_one), #ifdef CONFIG_PM .suspend = de_suspend, .resume = de_resume,