aboutsummaryrefslogtreecommitdiffstats
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/tracepoints/tracepoint-probe-sample2.c b/samples/tracepoints/tracepoint-probe-sample2.c
index be2a960573f1..9fcf990e5d4b 100644
--- a/samples/tracepoints/tracepoint-probe-sample2.c
+++ b/samples/tracepoints/tracepoint-probe-sample2.c
@@ -12,7 +12,8 @@
12 * Here the caller only guarantees locking for struct file and struct inode. 12 * Here the caller only guarantees locking for struct file and struct inode.
13 * Locking must therefore be done in the probe to use the dentry. 13 * Locking must therefore be done in the probe to use the dentry.
14 */ 14 */
15static void probe_subsys_event(struct inode *inode, struct file *file) 15static void probe_subsys_event(void *ignore,
16 struct inode *inode, struct file *file)
16{ 17{
17 printk(KERN_INFO "Event is encountered with inode number %lu\n", 18 printk(KERN_INFO "Event is encountered with inode number %lu\n",
18 inode->i_ino); 19 inode->i_ino);
@@ -22,7 +23,7 @@ static int __init tp_sample_trace_init(void)
22{ 23{
23 int ret; 24 int ret;
24 25
25 ret = register_trace_subsys_event(probe_subsys_event); 26 ret = register_trace_subsys_event(probe_subsys_event, NULL);
26 WARN_ON(ret); 27 WARN_ON(ret);
27 28
28 return 0; 29 return 0;
@@ -32,7 +33,7 @@ module_init(tp_sample_trace_init);
32 33
33static void __exit tp_sample_trace_exit(void) 34static void __exit tp_sample_trace_exit(void)
34{ 35{
35 unregister_trace_subsys_event(probe_subsys_event); 36 unregister_trace_subsys_event(probe_subsys_event, NULL);
36 tracepoint_synchronize_unregister(); 37 tracepoint_synchronize_unregister();
37} 38}
38 39