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

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

diff -u --recursive --new-file v2.4.0/linux/net/x25/x25_link.c linux/net/x25/x25_link.c
@@ -20,8 +20,6 @@
  *	2000-09-04	Henner Eisen	  dev_hold() / dev_put() for x25_neigh.
  */
 
-#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 +40,10 @@
 #include <linux/fcntl.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
+#include <linux/init.h>
 #include <net/x25.h>
 
-static struct x25_neigh *x25_neigh_list = NULL;
+static struct x25_neigh *x25_neigh_list /* = NULL initially */;
 
 static void x25_t20timer_expiry(unsigned long);
 
@@ -422,12 +421,11 @@
 	return 0;
 }
 
-#ifdef MODULE
 
 /*
  *	Release all memory associated with X.25 neighbour structures.
  */
-void x25_link_free(void)
+void __exit x25_link_free(void)
 {
 	struct x25_neigh *neigh, *x25_neigh = x25_neigh_list;
 
@@ -438,7 +436,3 @@
 		x25_remove_neigh(neigh);
 	}
 }
-
-#endif
-
-#endif

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