Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8c0eee9 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik
Browse files

Merge /spare/repo/netdev-2.6/ branch 'register-netdev'

parents 97f568d8 aef7b83c
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -171,12 +171,7 @@ struct net_device * __init el2_probe(int unit)
	err = do_el2_probe(dev);
	if (err)
		goto out;
	err = register_netdev(dev);
	if (err)
		goto out1;
	return dev;
out1:
	cleanup_card(dev);
out:
	free_netdev(dev);
	return ERR_PTR(err);
@@ -356,6 +351,10 @@ el2_probe1(struct net_device *dev, int ioaddr)
    dev->poll_controller = ei_poll;
#endif

    retval = register_netdev(dev);
    if (retval)
	goto out1;

    if (dev->mem_start)
	printk("%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n",
		dev->name, ei_status.name, (wordlength+1)<<3,
@@ -715,12 +714,9 @@ init_module(void)
		dev->base_addr = io[this_dev];
		dev->mem_end = xcvr[this_dev];	/* low 4bits = xcvr sel. */
		if (do_el2_probe(dev) == 0) {
			if (register_netdev(dev) == 0) {
			dev_el2[found++] = dev;
			continue;
		}
			cleanup_card(dev);
		}
		free_netdev(dev);
		printk(KERN_WARNING "3c503.c: No 3c503 card found (i/o = 0x%x).\n", io[this_dev]);
		break;
+6 −6
Original line number Diff line number Diff line
@@ -365,7 +365,7 @@ static int nopnp;
#endif /* __ISAPNP__ */

static struct net_device *corkscrew_scan(int unit);
static void corkscrew_setup(struct net_device *dev, int ioaddr,
static int corkscrew_setup(struct net_device *dev, int ioaddr,
			    struct pnp_dev *idev, int card_number);
static int corkscrew_open(struct net_device *dev);
static void corkscrew_timer(unsigned long arg);
@@ -539,10 +539,9 @@ static struct net_device *corkscrew_scan(int unit)
			printk(KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n",
		     		inl(ioaddr + 0x2002), inw(ioaddr + 0x2000));
			/* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */
			corkscrew_setup(dev, ioaddr, idev, cards_found++);
			SET_NETDEV_DEV(dev, &idev->dev);
			pnp_cards++;
			err = register_netdev(dev);
			err = corkscrew_setup(dev, ioaddr, idev, cards_found++);
			if (!err)
				return dev;
			cleanup_card(dev);
@@ -558,8 +557,7 @@ static struct net_device *corkscrew_scan(int unit)

		printk(KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n",
		     inl(ioaddr + 0x2002), inw(ioaddr + 0x2000));
		corkscrew_setup(dev, ioaddr, NULL, cards_found++);
		err = register_netdev(dev);
		err = corkscrew_setup(dev, ioaddr, NULL, cards_found++);
		if (!err)
			return dev;
		cleanup_card(dev);
@@ -568,7 +566,7 @@ static struct net_device *corkscrew_scan(int unit)
	return NULL;
}

static void corkscrew_setup(struct net_device *dev, int ioaddr,
static int corkscrew_setup(struct net_device *dev, int ioaddr,
			    struct pnp_dev *idev, int card_number)
{
	struct corkscrew_private *vp = netdev_priv(dev);
@@ -691,6 +689,8 @@ static void corkscrew_setup(struct net_device *dev, int ioaddr,
	dev->get_stats = &corkscrew_get_stats;
	dev->set_multicast_list = &set_rx_mode;
	dev->ethtool_ops = &netdev_ethtool_ops;

	return register_netdev(dev);
}


+7 −11
Original line number Diff line number Diff line
@@ -572,6 +572,10 @@ static int __init do_elmc_probe(struct net_device *dev)
        dev->flags&=~IFF_MULTICAST;     /* Multicast doesn't work */
#endif

	retval = register_netdev(dev);
	if (retval)
		goto err_out;

	return 0;
err_out:
	mca_set_adapter_procfn(slot, NULL, NULL);
@@ -600,12 +604,7 @@ struct net_device * __init elmc_probe(int unit)
	err = do_elmc_probe(dev);
	if (err)
		goto out;
	err = register_netdev(dev);
	if (err)
		goto out1;
	return dev;
out1:
	cleanup_card(dev);
out:
	free_netdev(dev);
	return ERR_PTR(err);
@@ -1288,13 +1287,10 @@ int init_module(void)
		dev->irq=irq[this_dev];
		dev->base_addr=io[this_dev];
		if (do_elmc_probe(dev) == 0) {
			if (register_netdev(dev) == 0) {
			dev_elmc[this_dev] = dev;
			found++;
			continue;
		}
			cleanup_card(dev);
		}
		free_netdev(dev);
		if (io[this_dev]==0)
			break;
+9 −10
Original line number Diff line number Diff line
@@ -146,12 +146,7 @@ struct net_device * __init ac3200_probe(int unit)
	err = do_ac3200_probe(dev);
	if (err)
		goto out;
	err = register_netdev(dev);
	if (err)
		goto out1;
	return dev;
out1:
	cleanup_card(dev);
out:
	free_netdev(dev);
	return ERR_PTR(err);
@@ -273,7 +268,14 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev)
	dev->poll_controller = ei_poll;
#endif
	NS8390_init(dev, 0);

	retval = register_netdev(dev);
	if (retval)
		goto out2;
	return 0;
out2:
	if (ei_status.reg0)
		iounmap((void *)dev->mem_start);
out1:
	free_irq(dev->irq, dev);
out:
@@ -392,12 +394,9 @@ init_module(void)
		dev->base_addr = io[this_dev];
		dev->mem_start = mem[this_dev];		/* Currently ignored by driver */
		if (do_ac3200_probe(dev) == 0) {
			if (register_netdev(dev) == 0) {
			dev_ac32[found++] = dev;
			continue;
		}
			cleanup_card(dev);
		}
		free_netdev(dev);
		printk(KERN_WARNING "ac3200.c: No ac3200 card found (i/o = 0x%x).\n", io[this_dev]);
		break;
+6 −13
Original line number Diff line number Diff line
@@ -319,13 +319,7 @@ struct net_device * __init cs89x0_probe(int unit)
	}
	if (err)
		goto out;
	err = register_netdev(dev);
	if (err)
		goto out1;
	return dev;
out1:
	outw(PP_ChipID, dev->base_addr + ADD_PORT);
	release_region(dev->base_addr, NETCARD_IO_EXTENT);
out:
	free_netdev(dev);
	printk(KERN_WARNING "cs89x0: no cs8900 or cs8920 detected.  Be sure to disable PnP with SETUP\n");
@@ -735,7 +729,13 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
	printk("\n");
	if (net_debug)
		printk("cs89x0_probe1() successful\n");

	retval = register_netdev(dev);
	if (retval)
		goto out3;
	return 0;
out3:
	outw(PP_ChipID, dev->base_addr + ADD_PORT);
out2:
	release_region(ioaddr & ~3, NETCARD_IO_EXTENT);
out1:
@@ -1831,13 +1831,6 @@ init_module(void)
	if (ret)
		goto out;

        if (register_netdev(dev) != 0) {
                printk(KERN_ERR "cs89x0.c: No card found at 0x%x\n", io);
                ret = -ENXIO;
		outw(PP_ChipID, dev->base_addr + ADD_PORT);
		release_region(dev->base_addr, NETCARD_IO_EXTENT);
		goto out;
        }
	dev_cs89x0 = dev;
	return 0;
out:
Loading