make apne.c use the new ei_alloc_dev(). kill ethdev_init() completly untested. --- 1.9/drivers/net/apne.c Mon May 26 01:49:07 2003 +++ edited/apne.c Sun Jun 29 20:46:06 2003 @@ -280,13 +280,6 @@ i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, dev->name, dev); if (i) return i; - /* Allocate dev->priv and fill in 8390 specific dev fields. */ - if (ethdev_init(dev)) { - printk (" unable to get memory for dev->priv.\n"); - free_irq(IRQ_AMIGA_PORTS, dev); - return -ENOMEM; - } - for(i = 0; i < ETHER_ADDR_LEN; i++) { printk(" %2.2x", SA_prom[i]); dev->dev_addr[i] = SA_prom[i]; @@ -320,8 +313,7 @@ static int apne_open(struct net_device *dev) { - ei_open(dev); - return 0; + return ei_open(dev); } static int @@ -534,16 +526,20 @@ } #ifdef MODULE -static struct net_device apne_dev; +static struct net_device *apne_dev; int init_module(void) { int err; - apne_dev.init = apne_probe; - if ((err = register_netdev(&apne_dev))) { - if (err == -EIO) - printk("No PCMCIA NEx000 ethernet card found.\n"); + apne_dev = ei_alloc_dev(); + if (!apne_dev) + return -ENOMEM; + + apne_dev->init = apne_probe; + if ((err = register_netdev(apne_dev))) { + kfree(apne_dev); + printk("No PCMCIA NEx000 ethernet card found.\n"); return (err); } return (0); @@ -551,11 +547,11 @@ void cleanup_module(void) { - unregister_netdev(&apne_dev); + unregister_netdev(apne_dev); pcmcia_disable_irq(); - free_irq(IRQ_AMIGA_PORTS, &apne_dev); + free_irq(IRQ_AMIGA_PORTS, apne_dev); pcmcia_reset(); - : 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