From: Thadeu Lima de Souza Cascardo Date: Sun, 6 Dec 2009 01:14:03 +0000 (-0200) Subject: Use init and exit marks. X-Git-Tag: v1.5.0 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fkernel%2Fsamples%2F01.hello%2F.git;a=commitdiff_plain;h=refs%2Ftags%2Fv1.5.0 Use init and exit marks. --- diff --git a/hello.c b/hello.c index dca8626..327ee34 100644 --- 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");