summaryrefslogtreecommitdiffstats
path: root/samples/markers
diff options
context:
space:
mode:
authorQinghuang Feng <qhfeng.kernel@gmail.com>2009-01-06 14:40:52 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:59:12 -0800
commit7ec7fb394298c212c30e063c57e0aa895efe9439 (patch)
treef2aa6cf2ff5d66595d5acb7d985bb157f67c6b29 /samples/markers
parent9fe06081ef145d6582c39e18203b5fffe6f3abc2 (diff)
downloadlinux-7ec7fb394298c212c30e063c57e0aa895efe9439.tar.gz
linux-7ec7fb394298c212c30e063c57e0aa895efe9439.tar.bz2
linux-7ec7fb394298c212c30e063c57e0aa895efe9439.zip
samples: mark {static|__init|__exit} for {init|exit} functions
None of these (init|exit) functions is called from other functions which is outside the kernel module mechanism or kernel itself, so mark them as {static|__init|__exit}. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'samples/markers')
-rw-r--r--samples/markers/marker-example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/markers/marker-example.c b/samples/markers/marker-example.c
index e90dc5d04392..e9cd9c0bc84f 100644
--- a/samples/markers/marker-example.c
+++ b/samples/markers/marker-example.c
@@ -30,7 +30,7 @@ static struct file_operations mark_ops = {
.open = my_open,
};
-static int example_init(void)
+static int __init example_init(void)
{
printk(KERN_ALERT "example init\n");
pentry_example = proc_create("marker-example", 0444, NULL, &mark_ops);
@@ -39,7 +39,7 @@ static int example_init(void)
return 0;
}
-static void example_exit(void)
+static void __exit example_exit(void)
{
printk(KERN_ALERT "example exit\n");
remove_proc_entry("marker-example", NULL);