mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 19:01:37 +00:00
fealnx: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
This commit is contained in:
parent
32e819e46e
commit
436dfc461b
@ -545,9 +545,6 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
|
|||||||
/* Reset the chip to erase previous misconfiguration. */
|
/* Reset the chip to erase previous misconfiguration. */
|
||||||
iowrite32(0x00000001, ioaddr + BCR);
|
iowrite32(0x00000001, ioaddr + BCR);
|
||||||
|
|
||||||
dev->base_addr = (unsigned long)ioaddr;
|
|
||||||
dev->irq = irq;
|
|
||||||
|
|
||||||
/* Make certain the descriptor lists are aligned. */
|
/* Make certain the descriptor lists are aligned. */
|
||||||
np = netdev_priv(dev);
|
np = netdev_priv(dev);
|
||||||
np->mem = ioaddr;
|
np->mem = ioaddr;
|
||||||
@ -832,11 +829,13 @@ static int netdev_open(struct net_device *dev)
|
|||||||
{
|
{
|
||||||
struct netdev_private *np = netdev_priv(dev);
|
struct netdev_private *np = netdev_priv(dev);
|
||||||
void __iomem *ioaddr = np->mem;
|
void __iomem *ioaddr = np->mem;
|
||||||
int i;
|
const int irq = np->pci_dev->irq;
|
||||||
|
int rc, i;
|
||||||
|
|
||||||
iowrite32(0x00000001, ioaddr + BCR); /* Reset */
|
iowrite32(0x00000001, ioaddr + BCR); /* Reset */
|
||||||
|
|
||||||
if (request_irq(dev->irq, intr_handler, IRQF_SHARED, dev->name, dev))
|
rc = request_irq(irq, intr_handler, IRQF_SHARED, dev->name, dev);
|
||||||
|
if (rc)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
@ -924,8 +923,8 @@ static int netdev_open(struct net_device *dev)
|
|||||||
np->reset_timer.data = (unsigned long) dev;
|
np->reset_timer.data = (unsigned long) dev;
|
||||||
np->reset_timer.function = reset_timer;
|
np->reset_timer.function = reset_timer;
|
||||||
np->reset_timer_armed = 0;
|
np->reset_timer_armed = 0;
|
||||||
|
out:
|
||||||
return 0;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1910,7 +1909,7 @@ static int netdev_close(struct net_device *dev)
|
|||||||
del_timer_sync(&np->timer);
|
del_timer_sync(&np->timer);
|
||||||
del_timer_sync(&np->reset_timer);
|
del_timer_sync(&np->reset_timer);
|
||||||
|
|
||||||
free_irq(dev->irq, dev);
|
free_irq(np->pci_dev->irq, dev);
|
||||||
|
|
||||||
/* Free all the skbuffs in the Rx queue. */
|
/* Free all the skbuffs in the Rx queue. */
|
||||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user