patch-1.3.39 linux/drivers/net/eexpress.c

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

diff -u --recursive --new-file v1.3.38/linux/drivers/net/eexpress.c linux/drivers/net/eexpress.c
@@ -442,9 +442,7 @@
 	dev->tbusy = 0;
 	dev->interrupt = 0;
 	dev->start = 1;
-#ifdef MODULE
 	MOD_INC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -656,9 +654,7 @@
 
 	/* Update the statistics here. */
 
-#ifdef MODULE
 	MOD_DEC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -1006,8 +1002,8 @@
 	0, 0, 0, NULL, express_probe };
 	
 
-int irq=0x300;
-int io=0;	
+static int irq=0x300;
+static int io=0;	
 
 int
 init_module(void)
@@ -1024,17 +1020,12 @@
 void
 cleanup_module(void)
 {
-	if (MOD_IN_USE)
-		printk("eexpress: device busy, remove delayed\n");
-	else
-	{
-		unregister_netdev(&dev_eexpress);
-		kfree_s(dev_eexpress.priv,sizeof(struct net_local));
-		dev_eexpress.priv=NULL;
+	unregister_netdev(&dev_eexpress);
+	kfree_s(dev_eexpress.priv,sizeof(struct net_local));
+	dev_eexpress.priv=NULL;
 
-		/* If we don't do this, we can't re-insmod it later. */
-		release_region(dev_eexpress.base_addr, EEXPRESS_IO_EXTENT);
-	}
+	/* If we don't do this, we can't re-insmod it later. */
+	release_region(dev_eexpress.base_addr, EEXPRESS_IO_EXTENT);
 }
 #endif /* MODULE */
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this