aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dlink
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2012-03-09 12:14:47 -0500
committerFrancois Romieu <romieu@fr.zoreil.com>2012-04-07 05:45:24 -0400
commitc514f285c37fc705e59956ae0b9fc79d28905d3b (patch)
tree19df827a4381d7960237f707150eb81d3def0e36 /drivers/net/ethernet/dlink
parentdfda3578867bbfa35c629b58b5886dd9f5da11ca (diff)
sundance: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/ethernet/dlink')
-rw-r--r--drivers/net/ethernet/dlink/sundance.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c
index d783f4f96ec0..d7bb52a7bda1 100644
--- a/drivers/net/ethernet/dlink/sundance.c
+++ b/drivers/net/ethernet/dlink/sundance.c
@@ -522,9 +522,6 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
522 cpu_to_le16(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET)); 522 cpu_to_le16(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET));
523 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 523 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
524 524
525 dev->base_addr = (unsigned long)ioaddr;
526 dev->irq = irq;
527
528 np = netdev_priv(dev); 525 np = netdev_priv(dev);
529 np->base = ioaddr; 526 np->base = ioaddr;
530 np->pci_dev = pdev; 527 np->pci_dev = pdev;
@@ -828,18 +825,19 @@ static int netdev_open(struct net_device *dev)
828{ 825{
829 struct netdev_private *np = netdev_priv(dev); 826 struct netdev_private *np = netdev_priv(dev);
830 void __iomem *ioaddr = np->base; 827 void __iomem *ioaddr = np->base;
828 const int irq = np->pci_dev->irq;
831 unsigned long flags; 829 unsigned long flags;
832 int i; 830 int i;
833 831
834 /* Do we need to reset the chip??? */ 832 /* Do we need to reset the chip??? */
835 833
836 i = request_irq(dev->irq, intr_handler, IRQF_SHARED, dev->name, dev); 834 i = request_irq(irq, intr_handler, IRQF_SHARED, dev->name, dev);
837 if (i) 835 if (i)
838 return i; 836 return i;
839 837
840 if (netif_msg_ifup(np)) 838 if (netif_msg_ifup(np))
841 printk(KERN_DEBUG "%s: netdev_open() irq %d.\n", 839 printk(KERN_DEBUG "%s: netdev_open() irq %d\n", dev->name, irq);
842 dev->name, dev->irq); 840
843 init_ring(dev); 841 init_ring(dev);
844 842
845 iowrite32(np->rx_ring_dma, ioaddr + RxListPtr); 843 iowrite32(np->rx_ring_dma, ioaddr + RxListPtr);
@@ -1814,7 +1812,7 @@ static int netdev_close(struct net_device *dev)
1814 } 1812 }
1815#endif /* __i386__ debugging only */ 1813#endif /* __i386__ debugging only */
1816 1814
1817 free_irq(dev->irq, dev); 1815 free_irq(np->pci_dev->irq, dev);
1818 1816
1819 del_timer_sync(&np->timer); 1817 del_timer_sync(&np->timer);
1820 1818