summaryrefslogtreecommitdiffstats
path: root/net/irda/af_irda.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda/af_irda.c')
-rw-r--r--net/irda/af_irda.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 2ba86afcc..69db79a0e 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -43,10 +43,10 @@
********************************************************************/
#include <linux/config.h>
+#include <linux/init.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/sockios.h>
-#include <linux/init.h>
#include <linux/if_arp.h>
#include <linux/net.h>
#include <linux/irda.h>
@@ -2155,17 +2155,19 @@ static struct notifier_block irda_dev_notifier = {
* Initialize IrDA protocol layer
*
*/
-void __init irda_proto_init(struct net_proto *pro)
+static int __init irda_proto_init(void)
{
- sock_register(&irda_family_ops);
-
- irda_packet_type.type = htons(ETH_P_IRDA);
+ sock_register(&irda_family_ops);
+
+ irda_packet_type.type = htons(ETH_P_IRDA);
dev_add_pack(&irda_packet_type);
-
- register_netdevice_notifier(&irda_dev_notifier);
-
- irda_init();
+
+ register_netdevice_notifier(&irda_dev_notifier);
+
+ irda_init();
+ return 0;
}
+module_init(irda_proto_init);
/*
* Function irda_proto_cleanup (void)
@@ -2186,4 +2188,5 @@ void irda_proto_cleanup(void)
return;
}
+module_exit(irda_proto_cleanup);
#endif /* MODULE */