patch-2.4.7 linux/drivers/net/rrunner.c

Next file: linux/drivers/net/setup.c
Previous file: linux/drivers/net/pppox.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/net/rrunner.c linux/drivers/net/rrunner.c
@@ -117,6 +117,14 @@
 
 static int probed __initdata = 0;
 
+#if LINUX_VERSION_CODE >= 0x20400
+static struct pci_device_id rrunner_pci_tbl[] __initdata = {
+	{ PCI_VENDOR_ID_ESSENTIAL, PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER, PCI_ANY_ID, PCI_ANY_ID, },
+	{ }			/* Terminating entry */
+};
+MODULE_DEVICE_TABLE(pci, rrunner_pci_tbl);
+#endif /* LINUX_VERSION_CODE >= 0x20400 */
+
 #ifdef NEW_NETINIT
 int __init rr_hippi_probe (void)
 #else
@@ -137,9 +145,6 @@
 		return -ENODEV;
 	probed++;
 
-	if (!pci_present())		/* is PCI BIOS even present? */
-		return -ENODEV;
-
 	version_disp = 0;
 
 	while((pdev = pci_find_device(PCI_VENDOR_ID_ESSENTIAL,
@@ -176,6 +181,7 @@
 		sprintf(rrpriv->name, "RoadRunner serial HIPPI");
 
 		dev->irq = pdev->irq;
+		SET_MODULE_OWNER(dev);
 		dev->open = &rr_open;
 		dev->hard_start_xmit = &rr_start_xmit;
 		dev->stop = &rr_close;
@@ -1183,7 +1189,6 @@
 
 	netif_start_queue(dev);
 
-	MOD_INC_USE_COUNT;
 	return ecode;
 
  error:
@@ -1348,7 +1353,6 @@
 	free_irq(dev->irq, dev);
 	spin_unlock(&rrpriv->lock);
 
-	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)