diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2012-03-09 09:35:40 -0500 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2012-04-07 05:45:25 -0400 |
commit | 436dfc461b87b49d67867a798c91cd8cfff23f12 (patch) | |
tree | 691b974037b1994e08ae58d80f566f3d957ebbc0 /drivers/net/ethernet/fealnx.c | |
parent | 32e819e46e028ec5901048baee66775d71c4ec51 (diff) |
fealnx: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/ethernet/fealnx.c')
-rw-r--r-- | drivers/net/ethernet/fealnx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net/ethernet/fealnx.c index 1637b9862292..6f939a1e1568 100644 --- a/drivers/net/ethernet/fealnx.c +++ b/drivers/net/ethernet/fealnx.c | |||
@@ -545,9 +545,6 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, | |||
545 | /* Reset the chip to erase previous misconfiguration. */ | 545 | /* Reset the chip to erase previous misconfiguration. */ |
546 | iowrite32(0x00000001, ioaddr + BCR); | 546 | iowrite32(0x00000001, ioaddr + BCR); |
547 | 547 | ||
548 | dev->base_addr = (unsigned long)ioaddr; | ||
549 | dev->irq = irq; | ||
550 | |||
551 | /* Make certain the descriptor lists are aligned. */ | 548 | /* Make certain the descriptor lists are aligned. */ |
552 | np = netdev_priv(dev); | 549 | np = netdev_priv(dev); |
553 | np->mem = ioaddr; | 550 | np->mem = ioaddr; |
@@ -832,11 +829,13 @@ static int netdev_open(struct net_device *dev) | |||
832 | { | 829 | { |
833 | struct netdev_private *np = netdev_priv(dev); | 830 | struct netdev_private *np = netdev_priv(dev); |
834 | void __iomem *ioaddr = np->mem; | 831 | void __iomem *ioaddr = np->mem; |
835 | int i; | 832 | const int irq = np->pci_dev->irq; |
833 | int rc, i; | ||
836 | 834 | ||
837 | iowrite32(0x00000001, ioaddr + BCR); /* Reset */ | 835 | iowrite32(0x00000001, ioaddr + BCR); /* Reset */ |
838 | 836 | ||
839 | if (request_irq(dev->irq, intr_handler, IRQF_SHARED, dev->name, dev)) | 837 | rc = request_irq(irq, intr_handler, IRQF_SHARED, dev->name, dev); |
838 | if (rc) | ||
840 | return -EAGAIN; | 839 | return -EAGAIN; |
841 | 840 | ||
842 | for (i = 0; i < 3; i++) | 841 | for (i = 0; i < 3; i++) |
@@ -924,8 +923,8 @@ static int netdev_open(struct net_device *dev) | |||
924 | np->reset_timer.data = (unsigned long) dev; | 923 | np->reset_timer.data = (unsigned long) dev; |
925 | np->reset_timer.function = reset_timer; | 924 | np->reset_timer.function = reset_timer; |
926 | np->reset_timer_armed = 0; | 925 | np->reset_timer_armed = 0; |
927 | 926 | out: | |
928 | return 0; | 927 | return rc; |
929 | } | 928 | } |
930 | 929 | ||
931 | 930 | ||
@@ -1910,7 +1909,7 @@ static int netdev_close(struct net_device *dev) | |||
1910 | del_timer_sync(&np->timer); | 1909 | del_timer_sync(&np->timer); |
1911 | del_timer_sync(&np->reset_timer); | 1910 | del_timer_sync(&np->reset_timer); |
1912 | 1911 | ||
1913 | free_irq(dev->irq, dev); | 1912 | free_irq(np->pci_dev->irq, dev); |
1914 | 1913 | ||
1915 | /* Free all the skbuffs in the Rx queue. */ | 1914 | /* Free all the skbuffs in the Rx queue. */ |
1916 | for (i = 0; i < RX_RING_SIZE; i++) { | 1915 | for (i = 0; i < RX_RING_SIZE; i++) { |