aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/firmware_class/firmware_sample_driver.c2
-rw-r--r--samples/kobject/kobject-example.c4
-rw-r--r--samples/kobject/kset-example.c4
-rw-r--r--samples/markers/marker-example.c4
-rw-r--r--samples/tracepoints/tracepoint-probe-sample.c4
-rw-r--r--samples/tracepoints/tracepoint-probe-sample2.c4
-rw-r--r--samples/tracepoints/tracepoint-sample.c4
7 files changed, 13 insertions, 13 deletions
diff --git a/samples/firmware_class/firmware_sample_driver.c b/samples/firmware_class/firmware_sample_driver.c
index 11114f389c49..219a29896603 100644
--- a/samples/firmware_class/firmware_sample_driver.c
+++ b/samples/firmware_class/firmware_sample_driver.c
@@ -100,7 +100,7 @@ static void sample_probe_async(void)
100 " request_firmware_nowait failed\n"); 100 " request_firmware_nowait failed\n");
101} 101}
102 102
103static int sample_init(void) 103static int __init sample_init(void)
104{ 104{
105 device_initialize(&ghost_device); 105 device_initialize(&ghost_device);
106 /* since there is no real hardware insertion I just call the 106 /* since there is no real hardware insertion I just call the
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}
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)
229 kobject_put(&foo->kobj); 229 kobject_put(&foo->kobj);
230} 230}
231 231
232static int example_init(void) 232static int __init example_init(void)
233{ 233{
234 /* 234 /*
235 * Create a kset with the name of "kset_example", 235 * Create a kset with the name of "kset_example",
@@ -264,7 +264,7 @@ foo_error:
264 return -EINVAL; 264 return -EINVAL;
265} 265}
266 266
267static void example_exit(void) 267static void __exit example_exit(void)
268{ 268{
269 destroy_foo_obj(baz_obj); 269 destroy_foo_obj(baz_obj);
270 destroy_foo_obj(bar_obj); 270 destroy_foo_obj(bar_obj);
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 = {
30 .open = my_open, 30 .open = my_open,
31}; 31};
32 32
33static int example_init(void) 33static int __init example_init(void)
34{ 34{
35 printk(KERN_ALERT "example init\n"); 35 printk(KERN_ALERT "example init\n");
36 pentry_example = proc_create("marker-example", 0444, NULL, &mark_ops); 36 pentry_example = proc_create("marker-example", 0444, NULL, &mark_ops);
@@ -39,7 +39,7 @@ static int example_init(void)
39 return 0; 39 return 0;
40} 40}
41 41
42static void example_exit(void) 42static void __exit example_exit(void)
43{ 43{
44 printk(KERN_ALERT "example exit\n"); 44 printk(KERN_ALERT "example exit\n");
45 remove_proc_entry("marker-example", NULL); 45 remove_proc_entry("marker-example", NULL);
diff --git a/samples/tracepoints/tracepoint-probe-sample.c b/samples/tracepoints/tracepoint-probe-sample.c
index e3a964889dc7..9e60eb6ca2d8 100644
--- a/samples/tracepoints/tracepoint-probe-sample.c
+++ b/samples/tracepoints/tracepoint-probe-sample.c
@@ -28,7 +28,7 @@ static void probe_subsys_eventb(void)
28 printk(KERN_INFO "Event B is encountered\n"); 28 printk(KERN_INFO "Event B is encountered\n");
29} 29}
30 30
31int __init tp_sample_trace_init(void) 31static int __init tp_sample_trace_init(void)
32{ 32{
33 int ret; 33 int ret;
34 34
@@ -42,7 +42,7 @@ int __init tp_sample_trace_init(void)
42 42
43module_init(tp_sample_trace_init); 43module_init(tp_sample_trace_init);
44 44
45void __exit tp_sample_trace_exit(void) 45static void __exit tp_sample_trace_exit(void)
46{ 46{
47 unregister_trace_subsys_eventb(probe_subsys_eventb); 47 unregister_trace_subsys_eventb(probe_subsys_eventb);
48 unregister_trace_subsys_event(probe_subsys_event); 48 unregister_trace_subsys_event(probe_subsys_event);
diff --git a/samples/tracepoints/tracepoint-probe-sample2.c b/samples/tracepoints/tracepoint-probe-sample2.c
index 685a5acb4562..be2a960573f1 100644
--- a/samples/tracepoints/tracepoint-probe-sample2.c
+++ b/samples/tracepoints/tracepoint-probe-sample2.c
@@ -18,7 +18,7 @@ static void probe_subsys_event(struct inode *inode, struct file *file)
18 inode->i_ino); 18 inode->i_ino);
19} 19}
20 20
21int __init tp_sample_trace_init(void) 21static int __init tp_sample_trace_init(void)
22{ 22{
23 int ret; 23 int ret;
24 24
@@ -30,7 +30,7 @@ int __init tp_sample_trace_init(void)
30 30
31module_init(tp_sample_trace_init); 31module_init(tp_sample_trace_init);
32 32
33void __exit tp_sample_trace_exit(void) 33static void __exit tp_sample_trace_exit(void)
34{ 34{
35 unregister_trace_subsys_event(probe_subsys_event); 35 unregister_trace_subsys_event(probe_subsys_event);
36 tracepoint_synchronize_unregister(); 36 tracepoint_synchronize_unregister();
diff --git a/samples/tracepoints/tracepoint-sample.c b/samples/tracepoints/tracepoint-sample.c
index 00d169792a3e..68d5dc0310e4 100644
--- a/samples/tracepoints/tracepoint-sample.c
+++ b/samples/tracepoints/tracepoint-sample.c
@@ -32,7 +32,7 @@ static struct file_operations mark_ops = {
32 .open = my_open, 32 .open = my_open,
33}; 33};
34 34
35static int example_init(void) 35static int __init example_init(void)
36{ 36{
37 printk(KERN_ALERT "example init\n"); 37 printk(KERN_ALERT "example init\n");
38 pentry_example = proc_create("tracepoint-example", 0444, NULL, 38 pentry_example = proc_create("tracepoint-example", 0444, NULL,
@@ -42,7 +42,7 @@ static int example_init(void)
42 return 0; 42 return 0;
43} 43}
44 44
45static void example_exit(void) 45static void __exit example_exit(void)
46{ 46{
47 printk(KERN_ALERT "example exit\n"); 47 printk(KERN_ALERT "example exit\n");
48 remove_proc_entry("tracepoint-example", NULL); 48 remove_proc_entry("tracepoint-example", NULL);