patch-2.3.27 linux/drivers/net/dmfe.c

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

diff -u --recursive --new-file v2.3.26/linux/drivers/net/dmfe.c linux/drivers/net/dmfe.c
@@ -59,6 +59,7 @@
 #include <linux/malloc.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
+#include <linux/init.h>
 #include <linux/version.h>
 
 #include <linux/delay.h>
@@ -275,7 +276,7 @@
 };
 
 /* function declaration ------------------------------------- */
-int dmfe_reg_board(struct net_device *);
+int dmfe_reg_board(void);
 static int dmfe_open(struct net_device *);
 static int dmfe_start_xmit(struct sk_buff *, struct net_device *);
 static int dmfe_stop(struct net_device *);
@@ -309,7 +310,7 @@
  *	Search DM910X board, allocate space and register it
  */
  
-int dmfe_reg_board(struct net_device *dev)
+int __init dmfe_reg_board(void)
 {
 	u32 pci_iobase;
 	u16 dm9102_count = 0;
@@ -318,6 +319,7 @@
 	struct dmfe_board_info *db;	/* Point a board information structure */
 	int i;
 	struct pci_dev *net_dev = NULL;
+	struct net_device *dev;
 
 	DMFE_DBUG(0, "dmfe_reg_board()", 0);
 
@@ -365,7 +367,7 @@
 		dm9102_count++;	/* Found a DM9102 card */
 
 		/* Init network device */
-		dev = init_etherdev(dev, 0);
+		dev = init_etherdev(NULL, 0);
 
 		/* Allocated board information structure */
 		db = (void *) (kmalloc(sizeof(*db), GFP_KERNEL | GFP_DMA));
@@ -402,7 +404,6 @@
 		for (i = 0; i < 6; i++)
 			dev->dev_addr[i] = db->srom[20 + i];
 
-		dev = 0;	/* NULL device */
 	}
 
 #ifdef MODULE
@@ -1488,7 +1489,7 @@
 		break;
 	}
 
-	return dmfe_reg_board(0);	/* search board and register */
+	return dmfe_reg_board();	/* search board and register */
 }
 
 /*

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