[2.4 patch] pc300_drv.c: mark a function pointer as __devexit_p

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I got the following link error in 2.4.25-pre7 when trying to compile 
drivers/net/wan/pc300_drv.c statically into a kernel with 
CONFIG_HOTPLUG=n :

<--  snip  -->

...
        -o vmlinux
local symbol 0: discarded in section `.text.exit' from drivers/net/wan/wan.o
make: *** [vmlinux] Error 1

<--  snip  -->


The patch below fixes this issue by marking the function pointer with 
__devexit_p .

I also did the following changes to this struct:
- added indentation
- switched to C99 initializers
- removed two unneeded NULL's


Please apply
Adrian


--- linux-2.4.25-pre7-full-nohotplug/drivers/net/wan/pc300_drv.c.old	2004-01-25 01:41:56.000000000 +0100
+++ linux-2.4.25-pre7-full-nohotplug/drivers/net/wan/pc300_drv.c	2004-01-25 01:42:52.000000000 +0100
@@ -3459,12 +3459,10 @@
 }
 
 static struct pci_driver cpc_driver = {
-	name:"pc300",
-	id_table:cpc_pci_dev_id,
-	probe:cpc_init_one,
-	remove:cpc_remove_one,
-	suspend:NULL,
-	resume:NULL,
+	.name		= "pc300",
+	.id_table	= cpc_pci_dev_id,
+	.probe		= cpc_init_one,
+	.remove		= __devexit_p(cpc_remove_one),
 };
 
 static int __init cpc_init(void)
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux