patch-2.3.47 linux/drivers/net/yellowfin.c

Next file: linux/drivers/parport/parport_pc.c
Previous file: linux/drivers/net/wavelan.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/net/yellowfin.c linux/drivers/net/yellowfin.c
@@ -75,7 +75,6 @@
 #error You must compile this driver with "-O".
 #endif
 
-#include <linux/config.h>
 #include <linux/version.h>
 #include <linux/module.h>
 #include <linux/modversions.h>
@@ -851,7 +850,7 @@
 	/* Code that should never be run!  Perhaps remove after testing.. */
 	{
 		static int stopit = 10;
-		if ((!(test_bit(LINK_STATE_START, &dev->state)))  &&  --stopit < 0) {
+		if ((!(netif_running(dev)))  &&  --stopit < 0) {
 			printk(KERN_ERR "%s: Emergency stop, looping startup interrupt.\n",
 				   dev->name);
 			free_irq(irq, dev);
@@ -1378,7 +1377,12 @@
 {
 	if (debug)					/* Emit version even if no cards detected. */
 		printk(KERN_INFO "%s", version);
-	return pci_register_driver (&yellowfin_driver) > 0 ? 0 : -ENODEV;
+
+	if (pci_register_driver (&yellowfin_driver) > 0)
+		return 0;
+
+	pci_unregister_driver (&yellowfin_driver);
+	return -ENODEV;
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)