Re: [2.5 patch] make de2104x hotplugable

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Sat Jul 27 2002 - 09:19:33 EST


Adrian Bunk wrote:
> Hi Jeff,
>
> since drivers/net/tulip/de2104x.c does currently not compile in 2.5.29 due
> to a .text.exit error when the driver is compiled into a kernel without
> hotplug support I'm wondering whether the patch below would be correct to
> make this PCI driver hotpluggable. Is my approach to change __init to
> __devinit and __exit to __devexit correct or is there something I've
> overseen?

This driver is intentionally not hot-pluggable. I'll convert when
someone actually tells me they are trying to hot-plug such a card.

> -static int __init de_init (void)
> +static int __devinit de_init (void)
> {
> #ifdef MODULE
> printk("%s", version);
> @@ -2231,7 +2231,7 @@
> return pci_module_init (&de_driver);
> }
>
> -static void __exit de_exit (void)
> +static void __devexit de_exit (void)
> {
> pci_unregister_driver (&de_driver);
> }

This is incorrect in any case -- the module init/exit functions are
always __init and __exit.

        Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:26 EST