patch-2.4.10 linux/drivers/net/declance.c

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

diff -u --recursive --new-file v2.4.9/linux/drivers/net/declance.c linux/drivers/net/declance.c
@@ -1006,7 +1006,7 @@
 	lance_set_multicast(dev);
 }
 
-static int __init dec_lance_init(const int type)
+static int __init dec_lance_init(struct net_device *dev, const int type)
 {
 	static unsigned version_printed;
 	struct net_device *dev;
@@ -1015,7 +1015,6 @@
 	int i, ret;
 	unsigned long esar_base;
 	unsigned char *esar;
-	struct net_device *dev;
 
 #ifndef CONFIG_TC
 	system_base = KN01_LANCE_BASE;
@@ -1026,12 +1025,12 @@
 	if (dec_lance_debug && version_printed++ == 0)
 		printk(version);
 
-	dev = init_etherdev(NULL, sizeof(struct lance_private));
+	dev = init_etherdev(0, sizeof(struct lance_private));
 	if (!dev)
 		return -ENOMEM;
 
 	/* init_etherdev ensures the data structures used by the LANCE are aligned. */
-	lp = dev->priv;
+	lp = (struct lance_private *) dev->priv;
 	spin_lock_init(&lp->lock);
 
 	switch (type) {
@@ -1217,6 +1216,7 @@
 /* Find all the lance cards on the system and initialize them */
 static int __init dec_lance_probe(void)
 {
+	struct net_device *dev = NULL;
 	static int called;
 
 #ifdef MODULE
@@ -1255,7 +1255,7 @@
 	}
 #endif
 
-	return dec_lance_init(type);
+	return dec_lance_init(dev, type);
 }
 
 static void __exit dec_lance_cleanup(void)

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