summaryrefslogtreecommitdiffstats
path: root/drivers/net/winbond-840.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-01-10 05:27:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-01-10 05:27:25 +0000
commitc9c06167e7933d93a6e396174c68abf242294abb (patch)
treed9a8bb30663e9a3405a1ef37ffb62bc14b9f019f /drivers/net/winbond-840.c
parentf79e8cc3c34e4192a3e5ef4cc9c6542fdef703c0 (diff)
Merge with Linux 2.4.0-test12.
Diffstat (limited to 'drivers/net/winbond-840.c')
-rw-r--r--drivers/net/winbond-840.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/winbond-840.c b/drivers/net/winbond-840.c
index 03f79ca2e..2996fb6f9 100644
--- a/drivers/net/winbond-840.c
+++ b/drivers/net/winbond-840.c
@@ -367,6 +367,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
dev = init_etherdev(NULL, sizeof(*np));
if (!dev)
return -ENOMEM;
+ SET_MODULE_OWNER(dev);
#ifdef USE_IO_OPS
ioaddr = pci_resource_start(pdev, 0);
@@ -623,12 +624,9 @@ static int netdev_open(struct net_device *dev)
writel(0x00000001, ioaddr + PCIBusCfg); /* Reset */
- MOD_INC_USE_COUNT;
-
- if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev)) {
- MOD_DEC_USE_COUNT;
- return -EAGAIN;
- }
+ i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev);
+ if (i)
+ return i;
if (debug > 1)
printk(KERN_DEBUG "%s: w89c840_open() irq %d.\n",
@@ -1305,8 +1303,6 @@ static int netdev_close(struct net_device *dev)
np->tx_skbuff[i] = 0;
}
- MOD_DEC_USE_COUNT;
-
return 0;
}