Cleanup: Move patches.i to include/generated/
[lttng-modules.git] / lttng-tracepoint.c
index ec77e7ccfb7dbfa4a7ffb62f232682f6ff824690..ed78a1770e16c13de50f51b620ca589deece0bc5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
  *
  * lttng-tracepoint.c
  *
@@ -15,8 +15,9 @@
 #include <linux/jhash.h>
 #include <linux/module.h>
 
-#include <lttng-tracepoint.h>
+#include <lttng/tracepoint.h>
 #include <wrapper/list.h>
+#include <wrapper/tracepoint.h>
 
 /*
  * Protect the tracepoint table. lttng_tracepoint_mutex nests within
@@ -228,7 +229,7 @@ int lttng_tracepoint_coming(struct tp_module *tp_mod)
                struct tracepoint_entry *e;
                struct lttng_tp_probe *p;
 
-               tp = tp_mod->mod->tracepoints_ptrs[i];
+               tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
                e = get_tracepoint(tp->name);
                if (!e) {
                        e = add_tracepoint(tp->name);
@@ -255,7 +256,7 @@ int lttng_tracepoint_coming(struct tp_module *tp_mod)
                }
        }
        mutex_unlock(&lttng_tracepoint_mutex);
-       return 0;
+       return NOTIFY_OK;
 }
 
 static
@@ -269,7 +270,7 @@ int lttng_tracepoint_going(struct tp_module *tp_mod)
                struct tracepoint_entry *e;
                struct lttng_tp_probe *p;
 
-               tp = tp_mod->mod->tracepoints_ptrs[i];
+               tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
                e = get_tracepoint(tp->name);
                if (!e || !e->tp)
                        continue;
This page took 0.02613 seconds and 4 git commands to generate.