aboutsummaryrefslogtreecommitdiff
path: root/samples/tracepoints/tracepoint-probe-sample2.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/tracepoints/tracepoint-probe-sample2.c')
-rw-r--r--samples/tracepoints/tracepoint-probe-sample2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/tracepoints/tracepoint-probe-sample2.c b/samples/tracepoints/tracepoint-probe-sample2.c
index 5e9fcf4afff..be2a960573f 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)
inode->i_ino);
}
-int __init tp_sample_trace_init(void)
+static int __init tp_sample_trace_init(void)
{
int ret;
@@ -30,9 +30,10 @@ 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();
}
module_exit(tp_sample_trace_exit);