Merge branch 'linus' into cont_syslog
[safe/jmp/linux-2.6] / samples / tracepoints / tracepoint-probe-sample.c
index 55abfdd..744c0b9 100644 (file)
@@ -13,7 +13,8 @@
  * Here the caller only guarantees locking for struct file and struct inode.
  * Locking must therefore be done in the probe to use the dentry.
  */
-static void probe_subsys_event(struct inode *inode, struct file *file)
+static void probe_subsys_event(void *ignore,
+                              struct inode *inode, struct file *file)
 {
        path_get(&file->f_path);
        dget(file->f_path.dentry);
@@ -23,18 +24,18 @@ static void probe_subsys_event(struct inode *inode, struct file *file)
        path_put(&file->f_path);
 }
 
-static void probe_subsys_eventb(void)
+static void probe_subsys_eventb(void *ignore)
 {
        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;
 
-       ret = register_trace_subsys_event(probe_subsys_event);
+       ret = register_trace_subsys_event(probe_subsys_event, NULL);
        WARN_ON(ret);
-       ret = register_trace_subsys_eventb(probe_subsys_eventb);
+       ret = register_trace_subsys_eventb(probe_subsys_eventb, NULL);
        WARN_ON(ret);
 
        return 0;
@@ -42,10 +43,11 @@ 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);
+       unregister_trace_subsys_eventb(probe_subsys_eventb, NULL);
+       unregister_trace_subsys_event(probe_subsys_event, NULL);
+       tracepoint_synchronize_unregister();
 }
 
 module_exit(tp_sample_trace_exit);