]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/de600.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
[linux-2.6-omap-h63xx.git] / drivers / net / de600.c
index dae97b860daaf92b1a6f77e8d30a5ae530471480..970f820ba814fc3b71d1f09401d74da5f0fa0b6a 100644 (file)
@@ -154,11 +154,6 @@ static int de600_close(struct net_device *dev)
        return 0;
 }
 
-static struct net_device_stats *get_stats(struct net_device *dev)
-{
-       return (struct net_device_stats *)(dev->priv);
-}
-
 static inline void trigger_interrupt(struct net_device *dev)
 {
        de600_put_command(FLIP_IRQ);
@@ -308,7 +303,7 @@ static int de600_tx_intr(struct net_device *dev, int irq_status)
        if (!(irq_status & TX_FAILED16)) {
                tx_fifo_out = (tx_fifo_out + 1) % TX_PAGES;
                ++free_tx_pages;
-               ((struct net_device_stats *)(dev->priv))->tx_packets++;
+               dev->stats.tx_packets++;
                netif_wake_queue(dev);
        }
 
@@ -374,9 +369,8 @@ static void de600_rx_intr(struct net_device *dev)
        netif_rx(skb);
 
        /* update stats */
-       dev->last_rx = jiffies;
-       ((struct net_device_stats *)(dev->priv))->rx_packets++; /* count all receives */
-       ((struct net_device_stats *)(dev->priv))->rx_bytes += size; /* count all received bytes */
+       dev->stats.rx_packets++; /* count all receives */
+       dev->stats.rx_bytes += size; /* count all received bytes */
 
        /*
         * If any worth-while packets have been received, netif_rx()
@@ -390,11 +384,10 @@ static struct net_device * __init de600_probe(void)
        struct net_device *dev;
        int err;
 
-       dev = alloc_etherdev(sizeof(struct net_device_stats));
+       dev = alloc_etherdev(0);
        if (!dev)
                return ERR_PTR(-ENOMEM);
 
-       SET_MODULE_OWNER(dev);
 
        if (!request_region(DE600_IO, 3, "de600")) {
                printk(KERN_WARNING "DE600: port 0x%x busy\n", DE600_IO);
@@ -444,12 +437,7 @@ static struct net_device * __init de600_probe(void)
                goto out1;
        }
 
-       printk(", Ethernet Address: %02X", dev->dev_addr[0]);
-       for (i = 1; i < ETH_ALEN; i++)
-               printk(":%02X",dev->dev_addr[i]);
-       printk("\n");
-
-       dev->get_stats = get_stats;
+       printk(", Ethernet Address: %pM\n", dev->dev_addr);
 
        dev->open = de600_open;
        dev->stop = de600_close;