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

Next file: linux/drivers/net/sunhme.c
Previous file: linux/drivers/net/smc-ultra32.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/sunbmac.c linux/drivers/net/sunbmac.c
@@ -1,4 +1,4 @@
-/* $Id: sunbmac.c,v 1.20 2000/07/11 22:35:22 davem Exp $
+/* $Id: sunbmac.c,v 1.21 2000/10/22 16:08:38 davem Exp $
  * sunbmac.c: Driver for Sparc BigMAC 100baseT ethernet adapters.
  *
  * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
@@ -63,9 +63,7 @@
 #define DIRQ(x)
 #endif
 
-#ifdef MODULE
 static struct bigmac *root_bigmac_dev = NULL;
-#endif
 
 #define DEFAULT_JAMSIZE    4 /* Toe jam */
 
@@ -1197,11 +1195,12 @@
 	dev->dma = 0;
 	ether_setup(dev);
 
-#ifdef MODULE
-	/* Put us into the list of instances attached for later module unloading. */
+	/* Put us into the list of instances attached for later driver
+	 * exit.
+	 */
 	bp->next_module = root_bigmac_dev;
 	root_bigmac_dev = bp;
-#endif
+
 	return 0;
 
 fail_and_cleanup:
@@ -1257,9 +1256,7 @@
 	static int called = 0;
 	int cards = 0, v;
 
-#ifdef MODULE
 	root_bigmac_dev = NULL;
-#endif
 
 	if (called)
 		return -ENODEV;
@@ -1284,8 +1281,6 @@
 
 static void __exit bigmac_cleanup(void)
 {
-#ifdef MODULE
-	/* No need to check MOD_IN_USE, as sys_delete_module() checks. */
 	while (root_bigmac_dev) {
 		struct bigmac *bp = root_bigmac_dev;
 		struct bigmac *bp_nxt = root_bigmac_dev->next_module;
@@ -1303,7 +1298,6 @@
 		kfree(bp->dev);
 		root_bigmac_dev = bp_nxt;
 	}
-#endif /* MODULE */
 }
 
 module_init(bigmac_probe);

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