From 4c8dfc260fa8b45364280b1deb4339ff4843bea2 Mon Sep 17 00:00:00 2001 From: Gevorg Hindoyan Date: Mon, 28 Apr 2014 17:01:12 +0400 Subject: [PATCH] Added __init and __exit macros As defined in linux/init.h this will free space defined for init/exit functions after they will finish. Haven't tried to compile as I am not on linux machine right now, but I will try once I'll get home. --- netcat_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netcat_main.c b/netcat_main.c index a42f2f3..368dc22 100644 --- a/netcat_main.c +++ b/netcat_main.c @@ -6,6 +6,7 @@ #include #include #include +#include #include "netcat.h" @@ -115,7 +116,7 @@ static struct miscdevice netcat_dev = { .mode = S_IRUGO, }; -static int netcat_init(void) +static int __init netcat_init(void) { int ret; @@ -132,7 +133,7 @@ static int netcat_init(void) return 0; } -static void netcat_exit(void) +static void __exit netcat_exit(void) { misc_deregister(&netcat_dev); }