From: Anders Wallin Date: Fri, 22 Jul 2016 13:56:59 +0000 (+0200) Subject: Fix: the clock plugin must be initiated before first use of the clock X-Git-Tag: v2.9.0-rc1~37 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=69a6252d5bf1787f2bbd0b6f35af8dff21efcb55;p=lttng-modules.git Fix: the clock plugin must be initiated before first use of the clock When building lttng inside the kernel the clock plugin must be initated before the rest of the lttng code. Moved the module_init to rootfs_initcall. The functionality will not change when built as a module. Signed-off-by: Anders Wallin Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/clock-plugin/lttng-clock-plugin-test.c b/tests/clock-plugin/lttng-clock-plugin-test.c index f16ea645..bf819329 100644 --- a/tests/clock-plugin/lttng-clock-plugin-test.c +++ b/tests/clock-plugin/lttng-clock-plugin-test.c @@ -67,7 +67,7 @@ int lttng_clock_plugin_init(void) { return lttng_clock_register_plugin(<c, THIS_MODULE); } -module_init(lttng_clock_plugin_init); +rootfs_initcall(lttng_clock_plugin_init); static __exit void lttng_clock_plugin_exit(void)