From 6b3050918aec1e7e7dfd22e0ade78b5eed6bab5b Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 25 Jan 2023 14:36:48 +0100 Subject: [PATCH] probe: convert to Zephyr native initialisation Use SOF_MODULE_INIT() to register probe with the Zephyr initialisation framework. Signed-off-by: Guennadi Liakhovetski --- src/probe/probe.c | 2 ++ zephyr/wrapper.c | 15 --------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/probe/probe.c b/src/probe/probe.c index 5289936ab..177624959 100644 --- a/src/probe/probe.c +++ b/src/probe/probe.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -1442,4 +1443,5 @@ UT_STATIC void sys_comp_probe_init(void) } DECLARE_MODULE(sys_comp_probe_init); +SOF_MODULE_INIT(probe, sys_comp_probe_init); #endif diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 8794dd16a..695d128a6 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -176,16 +176,6 @@ static void sys_module_init(void) #endif } -/* - * TODO: all the audio processing components/modules constructor should be - * linked to the module_init section, but this is not happening. Just call - * constructors directly atm. - */ - -#if CONFIG_IPC_MAJOR_4 -void sys_comp_probe_init(void); -#endif - /* Zephyr redefines log_message() and mtrace_printf() which leaves * totally empty the .static_log_entries ELF sections for the * sof-logger. This makes smex fail. Define at least one such section to @@ -223,11 +213,6 @@ int task_main_start(struct sof *sof) int start_complete(void) { -#if CONFIG_IPC_MAJOR_4 - if (IS_ENABLED(CONFIG_PROBE)) - sys_comp_probe_init(); -#endif - #if defined(CONFIG_IMX) #define SOF_IPC_QUEUED_DOMAIN SOF_SCHEDULE_LL_DMA #else