sky2: Avoid allocating memory in sky2_resume
[safe/jmp/linux-2.6] / drivers / net / sundance.c
index 47e8cce..2678588 100644 (file)
@@ -84,7 +84,6 @@ static char *media[MAX_UNITS];
 #include <linux/timer.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
-#include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/netdevice.h>
@@ -789,7 +788,6 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
                iowrite8(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr);
                mdio_delay();
        }
-       return;
 }
 
 static int mdio_wait_link(struct net_device *dev, int wait)
@@ -973,7 +971,7 @@ static void tx_timeout(struct net_device *dev)
 
        dev->if_port = 0;
 
-       dev->trans_start = jiffies;
+       dev->trans_start = jiffies; /* prevent tx timeout */
        dev->stats.tx_errors++;
        if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
                netif_wake_queue(dev);
@@ -1023,7 +1021,6 @@ static void init_ring(struct net_device *dev)
                np->tx_skbuff[i] = NULL;
                np->tx_ring[i].status = 0;
        }
-       return;
 }
 
 static void tx_poll (unsigned long data)
@@ -1050,7 +1047,6 @@ static void tx_poll (unsigned long data)
        if (ioread32 (np->base + TxListPtr) == 0)
                iowrite32 (np->tx_ring_dma + head * sizeof(struct netdev_desc),
                        np->base + TxListPtr);
-       return;
 }
 
 static netdev_tx_t
@@ -1085,7 +1081,6 @@ start_tx (struct sk_buff *skb, struct net_device *dev)
        } else {
                netif_stop_queue (dev);
        }
-       dev->trans_start = jiffies;
        if (netif_msg_tx_queued(np)) {
                printk (KERN_DEBUG
                        "%s: Transmit frame #%d queued in slot %d.\n",
@@ -1380,7 +1375,6 @@ not_done:
        if (np->budget <= 0)
                np->budget = RX_BUDGET;
        tasklet_schedule(&np->rx_tasklet);
-       return;
 }
 
 static void refill_rx (struct net_device *dev)
@@ -1411,7 +1405,6 @@ static void refill_rx (struct net_device *dev)
                np->rx_ring[entry].status = 0;
                cnt++;
        }
-       return;
 }
 static void netdev_error(struct net_device *dev, int intr_status)
 {