diff --git a/arch/sim/src/sim/up_rptun.c b/arch/sim/src/sim/up_rptun.c index 5bfd47a6da..66a20939c4 100644 --- a/arch/sim/src/sim/up_rptun.c +++ b/arch/sim/src/sim/up_rptun.c @@ -41,7 +41,6 @@ #include #include #include -#include #include "up_internal.h" @@ -245,10 +244,6 @@ int up_rptun_init(void) return ret; } -#ifdef CONFIG_SYSLOG_RPMSG - syslog_rpmsg_init(); -#endif - #ifdef CONFIG_SYSLOG_RPMSG_SERVER syslog_rpmsg_server_init(); #endif diff --git a/drivers/syslog/syslog_initialize.c b/drivers/syslog/syslog_initialize.c index 45baf8dac9..146602f440 100644 --- a/drivers/syslog/syslog_initialize.c +++ b/drivers/syslog/syslog_initialize.c @@ -43,6 +43,7 @@ #include #include +#include #include "syslog.h" @@ -101,6 +102,10 @@ int syslog_initialize(void) syslog_register(); #endif +#ifdef CONFIG_SYSLOG_CHARDEV + syslog_rpmsg_init(); +#endif + return ret; }