Re: [2.5 patch] make de2104x hotplugable

Adrian Bunk (bunk@fs.tum.de)
Sat, 27 Jul 2002 16:59:00 +0200 (CEST)


On Sat, 27 Jul 2002, Jeff Garzik wrote:

> > 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.

It's OK for me not to make it hot-pluggable, but in this case you need the
following patch to make it possible to compile the driver statically into
the kernel (currently it fails with a .text.exit error at the final
linking):

--- drivers/net/tulip/de2104x.c.old Sun May 12 13:55:28 2002
+++ drivers/net/tulip/de2104x.c Sun May 12 13:56:09 2002
@@ -2216,7 +2216,9 @@
name: DRV_NAME,
id_table: de_pci_tbl,
probe: de_init_one,
+#ifdef MODULE
remove: de_remove_one,
+#endif
#ifdef CONFIG_PM
suspend: de_suspend,
resume: de_resume,

> > -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.

Ah thanks, I had the feeling that something was wrong with my patch but I
didn't know what...

> Jeff

cu
Adrian

-- 

You only think this is a free country. Like the US the UK spends a lot of time explaining its a free country because its a police state. Alan Cox

- 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/