[lttng-dev] [PATCH lttng-modules] Fix: the clock plugin must be initiated before first use of the clock

Anders Wallin wallinux at gmail.com
Fri Jul 22 13:56:59 UTC 2016


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 <wallinux at gmail.com>
---
 tests/clock-plugin/lttng-clock-plugin-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/clock-plugin/lttng-clock-plugin-test.c b/tests/clock-plugin/lttng-clock-plugin-test.c
index f16ea64..bf81932 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(&ltc, THIS_MODULE);
 }
-module_init(lttng_clock_plugin_init);
+rootfs_initcall(lttng_clock_plugin_init);
 
 static __exit
 void lttng_clock_plugin_exit(void)
-- 
2.9.2



More information about the lttng-dev mailing list