Merge branch 'linus' into x86/i8259
[sfrench/cifs-2.6.git] / drivers / net / au1000_eth.c
index 185f98e3964c49b6a1615dc72c09f28ca227419f..7023d77bf380ffb31f42042e3b11a6cbedb5d3f9 100644 (file)
@@ -542,7 +542,7 @@ static struct {
 static int num_ifs;
 
 /*
- * Setup the base address and interupt of the Au1xxx ethernet macs
+ * Setup the base address and interrupt of the Au1xxx ethernet macs
  * based on cpu type and whether the interface is enabled in sys_pinfunc
  * register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0.
  */
@@ -701,7 +701,7 @@ static struct net_device * au1000_probe(int port_num)
        aup->mii_bus.write = mdiobus_write;
        aup->mii_bus.reset = mdiobus_reset;
        aup->mii_bus.name = "au1000_eth_mii";
-       aup->mii_bus.id = aup->mac_id;
+       snprintf(aup->mii_bus.id, MII_BUS_ID_SIZE, "%x", aup->mac_id);
        aup->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
        for(i = 0; i < PHY_MAX_ADDR; ++i)
                aup->mii_bus.irq[i] = PHY_POLL;
@@ -709,11 +709,11 @@ static struct net_device * au1000_probe(int port_num)
        /* if known, set corresponding PHY IRQs */
 #if defined(AU1XXX_PHY_STATIC_CONFIG)
 # if defined(AU1XXX_PHY0_IRQ)
-       if (AU1XXX_PHY0_BUSID == aup->mii_bus.id)
+       if (AU1XXX_PHY0_BUSID == aup->mac_id)
                aup->mii_bus.irq[AU1XXX_PHY0_ADDR] = AU1XXX_PHY0_IRQ;
 # endif
 # if defined(AU1XXX_PHY1_IRQ)
-       if (AU1XXX_PHY1_BUSID == aup->mii_bus.id)
+       if (AU1XXX_PHY1_BUSID == aup->mac_id)
                aup->mii_bus.irq[AU1XXX_PHY1_ADDR] = AU1XXX_PHY1_IRQ;
 # endif
 #endif
@@ -1239,12 +1239,7 @@ static int au1000_rx(struct net_device *dev)
  */
 static irqreturn_t au1000_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
-
-       if (dev == NULL) {
-               printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name);
-               return IRQ_RETVAL(1);
-       }
+       struct net_device *dev = dev_id;
 
        /* Handle RX interrupts first to minimize chance of overrun */