From b03a15c89aacda14f5422f66ee75817f7d625bad Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 24 Jan 2023 16:42:44 +0100 Subject: [PATCH] mux: convert to Zephyr native initialisation Use SOF_MODULE_INIT() to register mux with the Zephyr initialisation framework. Signed-off-by: Guennadi Liakhovetski --- src/audio/mux/mux.c | 4 ++-- zephyr/wrapper.c | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/audio/mux/mux.c b/src/audio/mux/mux.c index 5d00425d7..fe5f2eb95 100644 --- a/src/audio/mux/mux.c +++ b/src/audio/mux/mux.c @@ -5,8 +5,6 @@ // Author: Liam Girdwood // Artur Kloniecki - - #if CONFIG_COMP_MUX #include @@ -15,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1012,5 +1011,6 @@ UT_STATIC void sys_comp_mux_init(void) } DECLARE_MODULE(sys_comp_mux_init); +SOF_MODULE_INIT(mux, sys_comp_mux_init); #endif /* CONFIG_COMP_MUX */ diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 4c58a2d0f..aa82b3dc2 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -182,7 +182,6 @@ static void sys_module_init(void) * constructors directly atm. */ -void sys_comp_mux_init(void); void sys_comp_basefw_init(void); void sys_comp_copier_init(void); void sys_comp_module_cadence_interface_init(void); @@ -240,9 +239,6 @@ int task_main_start(struct sof *sof) int start_complete(void) { - if (IS_ENABLED(CONFIG_COMP_MUX)) - sys_comp_mux_init(); - if (IS_ENABLED(CONFIG_COMP_BASEFW_IPC4)) sys_comp_basefw_init();