Commit d02d0adf authored by Zwane Mwaikambo's avatar Zwane Mwaikambo Committed by Linus Torvalds

[PATCH] SET_MODULE_OWNER for tulip_core

Tested with a pcmcia tulip
parent c5df32b4
...@@ -485,12 +485,9 @@ tulip_open(struct net_device *dev) ...@@ -485,12 +485,9 @@ tulip_open(struct net_device *dev)
struct tulip_private *tp = (struct tulip_private *)dev->priv; struct tulip_private *tp = (struct tulip_private *)dev->priv;
#endif #endif
int retval; int retval;
MOD_INC_USE_COUNT;
if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) { if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev)))
MOD_DEC_USE_COUNT;
return retval; return retval;
}
tulip_init_ring (dev); tulip_init_ring (dev);
...@@ -823,8 +820,6 @@ static int tulip_close (struct net_device *dev) ...@@ -823,8 +820,6 @@ static int tulip_close (struct net_device *dev)
tp->tx_buffers[i].mapping = 0; tp->tx_buffers[i].mapping = 0;
} }
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
...@@ -1361,6 +1356,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1361,6 +1356,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
return -ENOMEM; return -ENOMEM;
} }
SET_MODULE_OWNER(dev);
if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) { if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) {
printk (KERN_ERR PFX "%s: I/O region (0x%lx@0x%lx) too small, " printk (KERN_ERR PFX "%s: I/O region (0x%lx@0x%lx) too small, "
"aborting\n", pdev->slot_name, "aborting\n", pdev->slot_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment