Commit 2a217dfb authored by Dave Jones's avatar Dave Jones Committed by Jeff Garzik

[netdrvr sunbmac] probe path cleanup

Merged from 2.4.x.
parent 1ba6f07b
...@@ -1033,8 +1033,9 @@ static void bigmac_set_multicast(struct net_device *dev) ...@@ -1033,8 +1033,9 @@ static void bigmac_set_multicast(struct net_device *dev)
sbus_writel(tmp, bregs + BMAC_RXCFG); sbus_writel(tmp, bregs + BMAC_RXCFG);
} }
static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec_sdev) static int __init bigmac_ether_init(struct sbus_dev *qec_sdev)
{ {
struct net_device *dev;
static int version_printed; static int version_printed;
struct bigmac *bp; struct bigmac *bp;
u8 bsizes, bsizes_more; u8 bsizes, bsizes_more;
...@@ -1049,9 +1050,6 @@ static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec ...@@ -1049,9 +1050,6 @@ static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec
if (version_printed++ == 0) if (version_printed++ == 0)
printk(KERN_INFO "%s", version); printk(KERN_INFO "%s", version);
if (!dev)
return -ENOMEM;
/* Report what we have found to the user. */ /* Report what we have found to the user. */
printk(KERN_INFO "%s: BigMAC 100baseT Ethernet ", dev->name); printk(KERN_INFO "%s: BigMAC 100baseT Ethernet ", dev->name);
dev->base_addr = (long) qec_sdev; dev->base_addr = (long) qec_sdev;
...@@ -1180,7 +1178,6 @@ static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec ...@@ -1180,7 +1178,6 @@ static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec
/* Finish net device registration. */ /* Finish net device registration. */
dev->irq = bp->bigmac_sdev->irqs[0]; dev->irq = bp->bigmac_sdev->irqs[0];
dev->dma = 0; dev->dma = 0;
ether_setup(dev);
/* Put us into the list of instances attached for later driver /* Put us into the list of instances attached for later driver
* exit. * exit.
...@@ -1235,7 +1232,6 @@ static int __init bigmac_match(struct sbus_dev *sdev) ...@@ -1235,7 +1232,6 @@ static int __init bigmac_match(struct sbus_dev *sdev)
static int __init bigmac_probe(void) static int __init bigmac_probe(void)
{ {
struct net_device *dev = NULL;
struct sbus_bus *sbus; struct sbus_bus *sbus;
struct sbus_dev *sdev = 0; struct sbus_dev *sdev = 0;
static int called; static int called;
...@@ -1249,12 +1245,9 @@ static int __init bigmac_probe(void) ...@@ -1249,12 +1245,9 @@ static int __init bigmac_probe(void)
for_each_sbus(sbus) { for_each_sbus(sbus) {
for_each_sbusdev(sdev, sbus) { for_each_sbusdev(sdev, sbus) {
if (cards)
dev = NULL;
if (bigmac_match(sdev)) { if (bigmac_match(sdev)) {
cards++; cards++;
if ((v = bigmac_ether_init(dev, sdev))) if ((v = bigmac_ether_init(sdev)))
return v; return v;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment