patch-2.4.0-test11 linux/drivers/net/atarilance.c

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

diff -u --recursive --new-file v2.4.0-test10/linux/drivers/net/atarilance.c linux/drivers/net/atarilance.c
@@ -357,7 +357,7 @@
 
 
 
-void *slow_memcpy( void *dst, const void *src, size_t len )
+static void *slow_memcpy( void *dst, const void *src, size_t len )
 
 {	char *cto = dst;
 	const char *cfrom = src;
@@ -375,6 +375,8 @@
     int i;
 	static int found = 0;
 
+	SET_MODULE_OWNER(dev);
+
 	if (!MACH_IS_ATARI || found)
 		/* Assume there's only one board possible... That seems true, since
 		 * the Riebl/PAM board's address cannot be changed. */
@@ -659,7 +661,6 @@
 	dev->start = 1;
 
 	DPRINTK( 2, ( "%s: LANCE is open, csr0 %04x\n", dev->name, DREG ));
-	MOD_INC_USE_COUNT;
 
 	return( 0 );
 }
@@ -1062,7 +1063,6 @@
 	   memory if we don't. */
 	DREG = CSR0_STOP;
 
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
@@ -1152,20 +1152,13 @@
 
 
 #ifdef MODULE
-static char devicename[9] = { 0, };
-
-static struct net_device atarilance_dev =
-{
-	devicename,	/* filled in by register_netdev() */
-	0, 0, 0, 0,	/* memory */
-	0, 0,		/* base, irq */
-	0, 0, 0, NULL, atarilance_probe,
-};
+static struct net_device atarilance_dev;
 
 int init_module(void)
 
 {	int err;
 
+	atarilance_dev.init = atarilance_probe;
 	if ((err = register_netdev( &atarilance_dev ))) {
 		if (err == -EIO)  {
 			printk( "No Atari Lance board found. Module not loaded.\n");

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