fsl_pq_mdio: Fix iomem unmapping for non-eTSEC2.0 controllers
[safe/jmp/linux-2.6] / drivers / net / sunbmac.c
index 977b3e0..25e81eb 100644 (file)
@@ -919,7 +919,7 @@ static int bigmac_open(struct net_device *dev)
        struct bigmac *bp = netdev_priv(dev);
        int ret;
 
-       ret = request_irq(dev->irq, &bigmac_interrupt, IRQF_SHARED, dev->name, bp);
+       ret = request_irq(dev->irq, bigmac_interrupt, IRQF_SHARED, dev->name, bp);
        if (ret) {
                printk(KERN_ERR "BIGMAC: Can't order irq %d to go.\n", dev->irq);
                return ret;
@@ -984,7 +984,7 @@ static int bigmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        dev->trans_start = jiffies;
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 static struct net_device_stats *bigmac_get_stats(struct net_device *dev)
@@ -1074,6 +1074,18 @@ static const struct ethtool_ops bigmac_ethtool_ops = {
        .get_link               = bigmac_get_link,
 };
 
+static const struct net_device_ops bigmac_ops = {
+       .ndo_open               = bigmac_open,
+       .ndo_stop               = bigmac_close,
+       .ndo_start_xmit         = bigmac_start_xmit,
+       .ndo_get_stats          = bigmac_get_stats,
+       .ndo_set_multicast_list = bigmac_set_multicast,
+       .ndo_tx_timeout         = bigmac_tx_timeout,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 static int __devinit bigmac_ether_init(struct of_device *op,
                                       struct of_device *qec_op)
 {
@@ -1187,16 +1199,8 @@ static int __devinit bigmac_ether_init(struct of_device *op,
        bp->dev = dev;
 
        /* Set links to our BigMAC open and close routines. */
-       dev->open = &bigmac_open;
-       dev->stop = &bigmac_close;
-       dev->hard_start_xmit = &bigmac_start_xmit;
        dev->ethtool_ops = &bigmac_ethtool_ops;
-
-       /* Set links to BigMAC statistic and multi-cast loading code. */
-       dev->get_stats = &bigmac_get_stats;
-       dev->set_multicast_list = &bigmac_set_multicast;
-
-       dev->tx_timeout = &bigmac_tx_timeout;
+       dev->netdev_ops = &bigmac_ops;
        dev->watchdog_timeo = 5*HZ;
 
        /* Finish net device registration. */
@@ -1233,7 +1237,7 @@ fail_and_cleanup:
                                  bp->bmac_block,
                                  bp->bblock_dvma);
 
-       /* This also frees the co-located 'dev->priv' */
+       /* This also frees the co-located private data */
        free_netdev(dev);
        return -ENODEV;
 }