patch-2.4.0-test11 linux/drivers/net/hp-plus.c

Next file: linux/drivers/net/hp.c
Previous file: linux/drivers/net/hamradio/soundmodem/sm.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test10/linux/drivers/net/hp-plus.c linux/drivers/net/hp-plus.c
@@ -141,10 +141,10 @@
 	unsigned char checksum = 0;
 	const char *name = "HP-PC-LAN+";
 	int mem_start;
-	static unsigned version_printed = 0;
+	static unsigned version_printed;
 
-	if (!request_region(ioaddr, HP_IO_EXTENT, "hp-plus"))
-		return -ENODEV;
+	if (!request_region(ioaddr, HP_IO_EXTENT, dev->name))
+		return -EBUSY;
 
 	/* Check for the HP+ signature, 50 48 0x 53. */
 	if (inw(ioaddr + HP_ID) != 0x4850
@@ -249,9 +249,10 @@
 {
 	int ioaddr = dev->base_addr - NIC_OFFSET;
 	int option_reg;
+	int retval;
 
-	if (request_irq(dev->irq, ei_interrupt, 0, "hp-plus", dev)) {
-	    return -EAGAIN;
+	if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) {
+	    return retval;
 	}
 
 	/* Reset the 8390 and HP chip. */
@@ -423,9 +424,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("hp-plus.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_HPP_CARDS; this_dev++) {
 		struct net_device *dev = &dev_hpp[this_dev];
 		dev->irq = irq[this_dev];
@@ -440,7 +438,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -464,7 +461,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 

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