]> git.hungrycats.org Git - linux/commitdiff
[PATCH] discarded section problem
authorRichard Henderson <rth@twiddle.net>
Mon, 11 Feb 2002 13:09:45 +0000 (05:09 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Mon, 11 Feb 2002 13:09:45 +0000 (05:09 -0800)
What should be happening with the references to the discarded .text.exit
section?  I see a __devexit_p mentioned in Documentation/pci.txt, but it
hasn't been implemented except for down inside ieee1394.

In any case, I need something like the following in order to build with
pre-release binutils 2.12.  If this sort of thing is acceptible I can
prepare a more comprehensive patch.

drivers/char/serial.c
drivers/net/tulip/tulip_core.c
include/linux/init.h

index 34b09d3f7d2700487ed47f32d40b570949b7ebf1..db15ce5bcf6872fb8ea85f24f5ed6b0c62ea9954 100644 (file)
@@ -4912,7 +4912,7 @@ MODULE_DEVICE_TABLE(pci, serial_pci_tbl);
 static struct pci_driver serial_pci_driver = {
        name:           "serial",
        probe:          serial_init_one,
-       remove:        serial_remove_one,
+       remove:        __devexit_p(serial_remove_one),
        id_table:       serial_pci_tbl,
 };
 
index 9143debdef24192f2b59e17e86c9fb8c5069c480..b5fa5225702828e2336f934caa0b33e0bbf41a1f 100644 (file)
@@ -1762,7 +1762,7 @@ static struct pci_driver tulip_driver = {
        name:           DRV_NAME,
        id_table:       tulip_pci_tbl,
        probe:          tulip_init_one,
-       remove:         tulip_remove_one,
+       remove:         __devexit_p(tulip_remove_one),
 #ifdef CONFIG_PM
        suspend:        tulip_suspend,
        resume:         tulip_resume,
index 0a9c2eba880ee2f86c1529c7dbb031f16201d083..efe3a9a00877f3213f620ef1d2763f9049046073 100644 (file)
@@ -174,11 +174,13 @@ typedef void (*__cleanup_module_func_t)(void);
 #define __devinitdata
 #define __devexit
 #define __devexitdata
+#define __devexit_p(x)  &(x)
 #else
 #define __devinit __init
 #define __devinitdata __initdata
 #define __devexit __exit
 #define __devexitdata __exitdata
+#define __devexit_p(x)  0
 #endif
 
 #endif /* _LINUX_INIT_H */