mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9fe06081ef
commit
7ec7fb3942
7 changed files with 13 additions and 13 deletions
|
|
@ -28,7 +28,7 @@ static void probe_subsys_eventb(void)
|
|||
printk(KERN_INFO "Event B is encountered\n");
|
||||
}
|
||||
|
||||
int __init tp_sample_trace_init(void)
|
||||
static int __init tp_sample_trace_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ int __init tp_sample_trace_init(void)
|
|||
|
||||
module_init(tp_sample_trace_init);
|
||||
|
||||
void __exit tp_sample_trace_exit(void)
|
||||
static void __exit tp_sample_trace_exit(void)
|
||||
{
|
||||
unregister_trace_subsys_eventb(probe_subsys_eventb);
|
||||
unregister_trace_subsys_event(probe_subsys_event);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static void probe_subsys_event(struct inode *inode, struct file *file)
|
|||
inode->i_ino);
|
||||
}
|
||||
|
||||
int __init tp_sample_trace_init(void)
|
||||
static int __init tp_sample_trace_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ int __init tp_sample_trace_init(void)
|
|||
|
||||
module_init(tp_sample_trace_init);
|
||||
|
||||
void __exit tp_sample_trace_exit(void)
|
||||
static void __exit tp_sample_trace_exit(void)
|
||||
{
|
||||
unregister_trace_subsys_event(probe_subsys_event);
|
||||
tracepoint_synchronize_unregister();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,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("tracepoint-example", 0444, NULL,
|
||||
|
|
@ -42,7 +42,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("tracepoint-example", NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue