!598 优化trace device初始化,不在system_init.c中调用,改为LOS_MODULE_INIT

Merge pull request !598 from LiteOS/master
This commit is contained in:
openharmony_ci 2021-09-02 04:06:41 +00:00 committed by Gitee
commit 5e07663374
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@
#include "los_dev_trace.h" #include "los_dev_trace.h"
#include "los_trace.h" #include "los_trace.h"
#include "los_hook.h" #include "los_hook.h"
#include "los_init.h"
#define TRACE_DRIVER "/dev/trace" #define TRACE_DRIVER "/dev/trace"
#define TRACE_DRIVER_MODE 0666 #define TRACE_DRIVER_MODE 0666
@ -155,3 +156,5 @@ int DevTraceRegister(void)
{ {
return register_driver(TRACE_DRIVER, &g_traceDevOps, TRACE_DRIVER_MODE, 0); /* 0666: file mode */ return register_driver(TRACE_DRIVER, &g_traceDevOps, TRACE_DRIVER_MODE, 0); /* 0666: file mode */
} }
LOS_MODULE_INIT(DevTraceRegister, LOS_INIT_LEVEL_KMOD_EXTENDED);