patch-2.4.0-test10 linux/drivers/net/wd.c

Next file: linux/drivers/parport/Makefile
Previous file: linux/drivers/net/wavelan.p.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/wd.c linux/drivers/net/wd.c
@@ -46,7 +46,7 @@
 {0x300, 0x280, 0x380, 0x240, 0};
 
 int wd_probe(struct net_device *dev);
-int wd_probe1(struct net_device *dev, int ioaddr);
+static int wd_probe1(struct net_device *dev, int ioaddr);
 
 static int wd_open(struct net_device *dev);
 static void wd_reset_8390(struct net_device *dev);
@@ -81,11 +81,6 @@
 	The wd_probe1() routine initializes the card and fills the
 	station address field. */
 
-#ifdef HAVE_DEVLIST
-struct netdev_entry wd_drv =
-{"wd", wd_probe1, WD_IO_EXTENT, wd_portlist};
-#else
-
 int __init wd_probe(struct net_device *dev)
 {
 	int i;
@@ -106,9 +101,8 @@
 
 	return -ENODEV;
 }
-#endif
 
-int __init wd_probe1(struct net_device *dev, int ioaddr)
+static int __init wd_probe1(struct net_device *dev, int ioaddr)
 {
 	int i;
 	int checksum = 0;
@@ -124,12 +118,6 @@
 		|| (checksum & 0xff) != 0xFF)
 		return -ENODEV;
 
-	/* We should have a "dev" from Space.c or the static module table. */
-	if (dev == NULL) {
-		printk("wd.c: Passed a NULL device.\n");
-		dev = init_etherdev(0, 0);
-	}
-
 	/* Check for semi-valid mem_start/end values if supplied. */
 	if ((dev->mem_start % 0x2000) || (dev->mem_end % 0x2000)) {
 		printk(KERN_WARNING "wd.c: user supplied mem_start or mem_end not on 8kB boundary - ignored.\n");
@@ -438,19 +426,11 @@
 
 #ifdef MODULE
 #define MAX_WD_CARDS	4	/* Max number of wd cards per module */
-static struct net_device dev_wd[MAX_WD_CARDS] = {
-	{
-		"",		/* assign a chunk of namelist[] below */
-		0, 0, 0, 0,
-		0, 0,
-		0, 0, 0, NULL, NULL
-	},
-};
-
-static int io[MAX_WD_CARDS] = { 0, };
-static int irq[MAX_WD_CARDS]  = { 0, };
-static int mem[MAX_WD_CARDS] = { 0, };
-static int mem_end[MAX_WD_CARDS] = { 0, };	/* for non std. mem size */
+static struct net_device dev_wd[MAX_WD_CARDS];
+static int io[MAX_WD_CARDS];
+static int irq[MAX_WD_CARDS];
+static int mem[MAX_WD_CARDS];
+static int mem_end[MAX_WD_CARDS];	/* for non std. mem size */
 
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");

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