patch-2.4.1 linux/net/x25/x25_route.c

Next file: linux/net/x25/x25_subr.c
Previous file: linux/net/x25/x25_out.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/net/x25/x25_route.c linux/net/x25/x25_route.c
@@ -17,7 +17,6 @@
  */
 
 #include <linux/config.h>
-#if defined(CONFIG_X25) || defined(CONFIG_X25_MODULE)
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -42,9 +41,10 @@
 #include <linux/mm.h>
 #include <linux/interrupt.h>
 #include <linux/notifier.h>
+#include <linux/init.h>
 #include <net/x25.h>
 
-static struct x25_route *x25_route_list = NULL;
+static struct x25_route *x25_route_list /* = NULL initially */;
 
 /*
  *	Add a new route.
@@ -255,12 +255,10 @@
 	return len;
 } 
 
-#ifdef MODULE
-
 /*
  *	Release all memory associated with X.25 routing structures.
  */
-void x25_route_free(void)
+void __exit x25_route_free(void)
 {
 	struct x25_route *route, *x25_route = x25_route_list;
 
@@ -271,7 +269,3 @@
 		x25_remove_route(route);
 	}
 }
-
-#endif
-
-#endif

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