patch-2.4.0-test10 linux/net/x25/af_x25.c
Next file: linux/scripts/Configure
Previous file: linux/net/unix/sysctl_net_unix.c
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Mon Oct 16 12:42:54 2000
- Orig file:
v2.4.0-test9/linux/net/x25/af_x25.c
- Orig date:
Sun Oct 8 10:50:39 2000
diff -u --recursive --new-file v2.4.0-test9/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -1283,8 +1283,11 @@
}
}
-void __init x25_proto_init(struct net_proto *pro)
+static int __init x25_init(void)
{
+#ifdef MODULE
+ struct net_device *dev;
+#endif /* MODULE */
sock_register(&x25_family_ops);
x25_packet_type.type = htons(ETH_P_X25);
@@ -1302,20 +1305,8 @@
proc_net_create("x25", 0, x25_get_info);
proc_net_create("x25_routes", 0, x25_routes_get_info);
#endif
-}
#ifdef MODULE
-EXPORT_NO_SYMBOLS;
-
-MODULE_AUTHOR("Jonathan Naylor <g4klx@g4klx.demon.co.uk>");
-MODULE_DESCRIPTION("The X.25 Packet Layer network layer protocol");
-
-int init_module(void)
-{
- struct net_device *dev;
-
- x25_proto_init(NULL);
-
/*
* Register any pre existing devices.
*/
@@ -1329,11 +1320,20 @@
x25_link_device_up(dev);
}
read_unlock(&dev_base_lock);
-
+#endif /* MODULE */
return 0;
}
+module_init(x25_init);
+
-void cleanup_module(void)
+
+#ifdef MODULE
+EXPORT_NO_SYMBOLS;
+
+MODULE_AUTHOR("Jonathan Naylor <g4klx@g4klx.demon.co.uk>");
+MODULE_DESCRIPTION("The X.25 Packet Layer network layer protocol");
+
+static void __exit x25_exit(void)
{
#ifdef CONFIG_PROC_FS
@@ -1354,7 +1354,7 @@
sock_unregister(AF_X25);
}
-
+module_exit(x25_exit);
#endif
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)