patch-2.4.0-test12 linux/drivers/net/ne2k-pci.c
Next file: linux/drivers/net/ne3210.c
Previous file: linux/drivers/net/ne2.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Tue Dec 5 12:29:38 2000
- Orig file:
v2.4.0-test11/linux/drivers/net/ne2k-pci.c
- Orig date:
Sun Nov 19 18:44:11 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/net/ne2k-pci.c linux/drivers/net/ne2k-pci.c
@@ -244,6 +244,7 @@
printk (KERN_ERR "ne2k-pci: cannot allocate ethernet device\n");
goto err_out_free_res;
}
+ SET_MODULE_OWNER(dev);
/* Reset card. Who knows what dain-bramaged state it was left in. */
{
@@ -358,11 +359,10 @@
static int ne2k_pci_open(struct net_device *dev)
{
- MOD_INC_USE_COUNT;
- if (request_irq(dev->irq, ei_interrupt, SA_SHIRQ, dev->name, dev)) {
- MOD_DEC_USE_COUNT;
- return -EAGAIN;
- }
+ int ret = request_irq(dev->irq, ei_interrupt, SA_SHIRQ, dev->name, dev);
+ if (ret)
+ return ret;
+
/* Set full duplex for the chips that we know about. */
if (ei_status.ne2k_flags & FORCE_FDX) {
long ioaddr = dev->base_addr;
@@ -380,7 +380,6 @@
{
ei_close(dev);
free_irq(dev->irq, dev);
- MOD_DEC_USE_COUNT;
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)