hamachi: stop using net_device.{base_addr, irq}.
authorFrancois Romieu <romieu@fr.zoreil.com>
Fri, 9 Mar 2012 17:37:58 +0000 (18:37 +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>
drivers/net/ethernet/packetengines/hamachi.c

index 0d29f5f4b8e41083a9114d5b2e43b7274bc1d04d..c2367158350ec8680da96b1ff8ecfd1099debd18 100644 (file)
@@ -683,8 +683,6 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev,
        }
 
        hmp->base = ioaddr;
-       dev->base_addr = (unsigned long)ioaddr;
-       dev->irq = irq;
        pci_set_drvdata(pdev, dev);
 
        hmp->chip_id = chip_id;
@@ -859,14 +857,11 @@ static int hamachi_open(struct net_device *dev)
        u32 rx_int_var, tx_int_var;
        u16 fifo_info;
 
-       i = request_irq(dev->irq, hamachi_interrupt, IRQF_SHARED, dev->name, dev);
+       i = request_irq(hmp->pci_dev->irq, hamachi_interrupt, IRQF_SHARED,
+                       dev->name, dev);
        if (i)
                return i;
 
-       if (hamachi_debug > 1)
-               printk(KERN_DEBUG "%s: hamachi_open() irq %d.\n",
-                          dev->name, dev->irq);
-
        hamachi_init_ring(dev);
 
 #if ADDRLEN == 64
@@ -1705,7 +1700,7 @@ static int hamachi_close(struct net_device *dev)
        }
 #endif /* __i386__ debugging only */
 
-       free_irq(dev->irq, dev);
+       free_irq(hmp->pci_dev->irq, dev);
 
        del_timer_sync(&hmp->timer);