via-rhine: stop using net_device.{base_addr, irq}.
authorFrancois Romieu <romieu@fr.zoreil.com>
Fri, 9 Mar 2012 14:28:18 +0000 (15:28 +0100)
committerFrancois Romieu <romieu@fr.zoreil.com>
Sat, 7 Apr 2012 09:45:24 +0000 (11:45 +0200)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Lv <DavidLv@viatech.com.cn>
drivers/net/ethernet/via/via-rhine.c

index 39b8cf3dafcdb9c20d1ed5bedddcfde684d65f3a..47b411fe3ecbe6c38f0352b0ecdbc50978a441c0 100644 (file)
@@ -687,9 +687,12 @@ static void __devinit rhine_reload_eeprom(long pioaddr, struct net_device *dev)
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void rhine_poll(struct net_device *dev)
 {
-       disable_irq(dev->irq);
-       rhine_interrupt(dev->irq, (void *)dev);
-       enable_irq(dev->irq);
+       struct rhine_private *rp = netdev_priv(dev);
+       const int irq = rp->pdev->irq;
+
+       disable_irq(irq);
+       rhine_interrupt(irq, dev);
+       enable_irq(irq);
 }
 #endif
 
@@ -970,7 +973,6 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
        }
 #endif /* USE_MMIO */
 
-       dev->base_addr = (unsigned long)ioaddr;
        rp->base = ioaddr;
 
        /* Get chip registers into a sane state */
@@ -993,8 +995,6 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
        if (!phy_id)
                phy_id = ioread8(ioaddr + 0x6C);
 
-       dev->irq = pdev->irq;
-
        spin_lock_init(&rp->lock);
        mutex_init(&rp->task_lock);
        INIT_WORK(&rp->reset_task, rhine_reset_task);