aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFlorian Fainelli <florian.fainelli@telecomint.eu>2007-12-12 17:13:15 -0500
committerFrancois Romieu <romieu@fr.zoreil.com>2008-02-05 17:29:22 -0500
commitec6d2d453a932fd50c5fd95d5aac633b4e5f241d (patch)
tree2112d2ddbe9d5944242d6a8723c86ec67c52083b /drivers
parent106adf3c84d081776a1d1fbb8a047cad12af2bb9 (diff)
r6040: cleanups
- use netdev_alloc_skb - remove an useless variable in the IRQ handler - remove an unused private structure member - fix a spelling mistake Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/r6040.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 7ca6a934524f..19184e486ae9 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -173,7 +173,6 @@ struct r6040_private {
173 struct net_device *dev; 173 struct net_device *dev;
174 struct mii_if_info mii_if; 174 struct mii_if_info mii_if;
175 struct napi_struct napi; 175 struct napi_struct napi;
176 u16 napi_rx_running;
177 void __iomem *base; 176 void __iomem *base;
178}; 177};
179 178
@@ -290,7 +289,7 @@ static void rx_buf_alloc(struct r6040_private *lp, struct net_device *dev)
290 289
291 descptr = lp->rx_insert_ptr; 290 descptr = lp->rx_insert_ptr;
292 while (lp->rx_free_desc < RX_DCNT) { 291 while (lp->rx_free_desc < RX_DCNT) {
293 descptr->skb_ptr = dev_alloc_skb(MAX_BUF_SIZE); 292 descptr->skb_ptr = netdev_alloc_skb(dev, MAX_BUF_SIZE);
294 293
295 if (!descptr->skb_ptr) 294 if (!descptr->skb_ptr)
296 break; 295 break;
@@ -584,7 +583,7 @@ static void r6040_tx(struct net_device *dev)
584 dev->stats.tx_carrier_errors++; 583 dev->stats.tx_carrier_errors++;
585 584
586 if (descptr->status & 0x8000) 585 if (descptr->status & 0x8000)
587 break; /* Not complte */ 586 break; /* Not complete */
588 skb_ptr = descptr->skb_ptr; 587 skb_ptr = descptr->skb_ptr;
589 pci_unmap_single(priv->pdev, descptr->buf, 588 pci_unmap_single(priv->pdev, descptr->buf,
590 skb_ptr->len, PCI_DMA_TODEVICE); 589 skb_ptr->len, PCI_DMA_TODEVICE);
@@ -627,7 +626,6 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
627 struct r6040_private *lp = netdev_priv(dev); 626 struct r6040_private *lp = netdev_priv(dev);
628 void __iomem *ioaddr = lp->base; 627 void __iomem *ioaddr = lp->base;
629 u16 status; 628 u16 status;
630 int handled = 1;
631 629
632 /* Mask off RDC MAC interrupt */ 630 /* Mask off RDC MAC interrupt */
633 iowrite16(MSK_INT, ioaddr + MIER); 631 iowrite16(MSK_INT, ioaddr + MIER);
@@ -647,7 +645,7 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
647 if (status & 0x10) 645 if (status & 0x10)
648 r6040_tx(dev); 646 r6040_tx(dev);
649 647
650 return IRQ_RETVAL(handled); 648 return IRQ_HANDLED;
651} 649}
652 650
653#ifdef CONFIG_NET_POLL_CONTROLLER 651#ifdef CONFIG_NET_POLL_CONTROLLER