aboutsummaryrefslogtreecommitdiffstats
path: root/samples/kobject/kobject-example.c
diff options
context:
space:
mode:
authorQinghuang Feng <qhfeng.kernel@gmail.com>2009-01-06 17:40:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:12 -0500
commit7ec7fb394298c212c30e063c57e0aa895efe9439 (patch)
treef2aa6cf2ff5d66595d5acb7d985bb157f67c6b29 /samples/kobject/kobject-example.c
parent9fe06081ef145d6582c39e18203b5fffe6f3abc2 (diff)
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/kobject/kobject-example.c')
-rw-r--r--samples/kobject/kobject-example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c
index 08d0d3ff3263..8d9b55a12023 100644
--- a/samples/kobject/kobject-example.c
+++ b/samples/kobject/kobject-example.c
@@ -101,7 +101,7 @@ static struct attribute_group attr_group = {
101 101
102static struct kobject *example_kobj; 102static struct kobject *example_kobj;
103 103
104static int example_init(void) 104static int __init example_init(void)
105{ 105{
106 int retval; 106 int retval;
107 107
@@ -126,7 +126,7 @@ static int example_init(void)
126 return retval; 126 return retval;
127} 127}
128 128
129static void example_exit(void) 129static void __exit example_exit(void)
130{ 130{
131 kobject_put(example_kobj); 131 kobject_put(example_kobj);
132} 132}