summaryrefslogtreecommitdiffstats
path: root/samples/kobject
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/kobject
parent9fe06081ef145d6582c39e18203b5fffe6f3abc2 (diff)
downloadblackbird-op-linux-7ec7fb394298c212c30e063c57e0aa895efe9439.tar.gz
blackbird-op-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/kobject')
-rw-r--r--samples/kobject/kobject-example.c4
-rw-r--r--samples/kobject/kset-example.c4
2 files changed, 4 insertions, 4 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 = {
static struct kobject *example_kobj;
-static int example_init(void)
+static int __init example_init(void)
{
int retval;
@@ -126,7 +126,7 @@ static int example_init(void)
return retval;
}
-static void example_exit(void)
+static void __exit example_exit(void)
{
kobject_put(example_kobj);
}
diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
index 7395c0bbae18..45b7d56fb541 100644
--- a/samples/kobject/kset-example.c
+++ b/samples/kobject/kset-example.c
@@ -229,7 +229,7 @@ static void destroy_foo_obj(struct foo_obj *foo)
kobject_put(&foo->kobj);
}
-static int example_init(void)
+static int __init example_init(void)
{
/*
* Create a kset with the name of "kset_example",
@@ -264,7 +264,7 @@ foo_error:
return -EINVAL;
}
-static void example_exit(void)
+static void __exit example_exit(void)
{
destroy_foo_obj(baz_obj);
destroy_foo_obj(bar_obj);
OpenPOWER on IntegriCloud