patch-2.4.2 linux/drivers/net/hydra.c

Next file: linux/drivers/net/i82586.h
Previous file: linux/drivers/net/hplance.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/net/hydra.c linux/drivers/net/hydra.c
@@ -19,7 +19,7 @@
 #include <linux/ptrace.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
@@ -82,9 +82,6 @@
     unsigned long board;
     int err = -ENODEV;
 
-    if (load_8390_module("hydra.c"))
-	return -ENOSYS;
-
     while ((z = zorro_find_device(ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET, z))) {
 	board = z->resource.start;
 	if (!request_mem_region(board, 0x10000, "Hydra"))
@@ -96,10 +93,9 @@
 	err = 0;
     }
 
-    if (err == -ENODEV) {
+    if (err == -ENODEV)
 	printk("No Hydra ethernet card found.\n");
-	unload_8390_module();
-    }
+
     return err;
 }
 
@@ -116,9 +112,10 @@
 	0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
     };
 
-    dev = init_etherdev(0, 0);
+    dev = init_etherdev(NULL, 0);
     if (!dev)
 	return -ENOMEM;
+    SET_MODULE_OWNER(dev);
 
     for(j = 0; j < ETHER_ADDR_LEN; j++)
 	dev->dev_addr[j] = *((u8 *)(board + HYDRA_ADDRPROM + 2*j));
@@ -174,7 +171,6 @@
 static int hydra_open(struct net_device *dev)
 {
     ei_open(dev);
-    MOD_INC_USE_COUNT;
     return 0;
 }
 
@@ -183,7 +179,6 @@
     if (ei_debug > 1)
 	printk("%s: Shutting down ethercard.\n", dev->name);
     ei_close(dev);
-    MOD_DEC_USE_COUNT;
     return 0;
 }
 
@@ -254,7 +249,6 @@
 	kfree(dev);
 	root_hydra_dev = next;
     }
-    unload_8390_module();
 #endif
 }
 

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