patch-2.4.0-test10 linux/net/ax25/af_ax25.c

Next file: linux/net/ax25/ax25_ds_in.c
Previous file: linux/net/ax25/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
@@ -101,6 +101,7 @@
  *						ax25_connect() and ax25_sendmsg()
  *			Joerg(DL1BKE)		Added support for SO_BINDTODEVICE
  *			Arnaldo C. Melo		s/suser/capable(CAP_NET_ADMIN)/, some more cleanups
+ *			Michal Ostrowski	Module initialization cleanup.
  */
 
 #include <linux/config.h>
@@ -137,6 +138,8 @@
 #include <net/ip.h>
 #include <net/arp.h>
 
+
+
 ax25_cb *volatile ax25_list = NULL;
 
 static struct proto_ops ax25_proto_ops;
@@ -1193,7 +1196,7 @@
 	 */
 	if (sk->zapped) {
 		/* check if we can remove this feature. It is broken. */
-		printk(KERN_WARNING "ax25_connect(): %s uses autobind, please contact jreuter@poboxes.com\n",
+		printk(KERN_WARNING "ax25_connect(): %s uses autobind, please contact jreuter@yaina.de\n",
 			current->comm);
 		if ((err = ax25_rt_autobind(sk->protinfo.ax25, &fsa->fsa_ax25.sax25_call)) < 0)
 			return err;
@@ -1844,7 +1847,7 @@
 EXPORT_SYMBOL(null_ax25_address);
 EXPORT_SYMBOL(ax25_display_timer);
 
-void __init ax25_proto_init(struct net_proto *pro)
+static int __init ax25_init(void)
 {
 	sock_register(&ax25_family_ops);
 	ax25_packet_type.type = htons(ETH_P_AX25);
@@ -1861,20 +1864,16 @@
 #endif
 
 	printk(KERN_INFO "NET4: G4KLX/GW4PTS AX.25 for Linux. Version 0.37 for Linux NET4.0\n");
+	return 0;
 }
+module_init(ax25_init);
+
 
 #ifdef MODULE
 MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
 MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol");
 
-int init_module(void)
-{
-	ax25_proto_init(NULL);
-
-	return 0;
-}
-
-void cleanup_module(void)
+static void __exit ax25_exit(void)
 {
 #ifdef CONFIG_PROC_FS
 	proc_net_remove("ax25_route");
@@ -1895,6 +1894,7 @@
 
 	sock_unregister(PF_AX25);
 }
-#endif
+module_exit(ax25_exit);
+#endif /* MODULE */
 
 #endif

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