Commit 60b28a11 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by David S. Miller

ftgmac100: Use netdev->irq instead of private copy

There's a placeholder already for the irq, use it
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bb54be58
...@@ -57,7 +57,6 @@ struct ftgmac100_descs { ...@@ -57,7 +57,6 @@ struct ftgmac100_descs {
struct ftgmac100 { struct ftgmac100 {
struct resource *res; struct resource *res;
void __iomem *base; void __iomem *base;
int irq;
struct ftgmac100_descs *descs; struct ftgmac100_descs *descs;
dma_addr_t descs_dma_addr; dma_addr_t descs_dma_addr;
...@@ -1121,9 +1120,9 @@ static int ftgmac100_open(struct net_device *netdev) ...@@ -1121,9 +1120,9 @@ static int ftgmac100_open(struct net_device *netdev)
goto err_alloc; goto err_alloc;
} }
err = request_irq(priv->irq, ftgmac100_interrupt, 0, netdev->name, netdev); err = request_irq(netdev->irq, ftgmac100_interrupt, 0, netdev->name, netdev);
if (err) { if (err) {
netdev_err(netdev, "failed to request irq %d\n", priv->irq); netdev_err(netdev, "failed to request irq %d\n", netdev->irq);
goto err_irq; goto err_irq;
} }
...@@ -1170,7 +1169,7 @@ static int ftgmac100_open(struct net_device *netdev) ...@@ -1170,7 +1169,7 @@ static int ftgmac100_open(struct net_device *netdev)
netif_stop_queue(netdev); netif_stop_queue(netdev);
iowrite32(0, priv->base + FTGMAC100_OFFSET_IER); iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
err_hw: err_hw:
free_irq(priv->irq, netdev); free_irq(netdev->irq, netdev);
err_irq: err_irq:
ftgmac100_free_buffers(priv); ftgmac100_free_buffers(priv);
err_alloc: err_alloc:
...@@ -1196,7 +1195,7 @@ static int ftgmac100_stop(struct net_device *netdev) ...@@ -1196,7 +1195,7 @@ static int ftgmac100_stop(struct net_device *netdev)
ncsi_stop_dev(priv->ndev); ncsi_stop_dev(priv->ndev);
ftgmac100_stop_hw(priv); ftgmac100_stop_hw(priv);
free_irq(priv->irq, netdev); free_irq(netdev->irq, netdev);
ftgmac100_free_buffers(priv); ftgmac100_free_buffers(priv);
return 0; return 0;
...@@ -1383,7 +1382,7 @@ static int ftgmac100_probe(struct platform_device *pdev) ...@@ -1383,7 +1382,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
goto err_ioremap; goto err_ioremap;
} }
priv->irq = irq; netdev->irq = irq;
/* MAC address from chip or random one */ /* MAC address from chip or random one */
ftgmac100_setup_mac(priv); ftgmac100_setup_mac(priv);
...@@ -1440,7 +1439,7 @@ static int ftgmac100_probe(struct platform_device *pdev) ...@@ -1440,7 +1439,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
goto err_register_netdev; goto err_register_netdev;
} }
netdev_info(netdev, "irq %d, mapped at %p\n", priv->irq, priv->base); netdev_info(netdev, "irq %d, mapped at %p\n", netdev->irq, priv->base);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment