Use init and exit marks. v1.5.0
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 6 Dec 2009 01:14:03 +0000 (23:14 -0200)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 6 Dec 2009 01:14:03 +0000 (23:14 -0200)
hello.c

diff --git a/hello.c b/hello.c
index dca8626..327ee34 100644 (file)
--- a/hello.c
+++ b/hello.c
@@ -15,7 +15,7 @@ MODULE_LICENSE("GPL");
 #endif
 
 /* Our init function: returns 0 if successfull, an error code, otherwise. */
-static int hello_init(void)
+static int __init hello_init(void)
 {
        /* printk is just like printf, but without floating point support. */
        printk(KERN_ALERT "Hello, " SUBJECT "!\n");
@@ -23,7 +23,7 @@ static int hello_init(void)
 }
 
 /* Our exit function: static is good, so we do not pollute namespace. */
-static void hello_exit(void)
+static void __exit hello_exit(void)
 {
        /* KERN_ALERT is a string macro prepended to our message. */
        printk(KERN_ALERT "Goodbye, cruel " SUBJECT "!\n");