aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/rtkernel.c
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2024-04-09 01:29:34 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2024-05-26 09:57:51 +0000
commitfbea7d5d38d0dcbdd71cb574da9bd12c78b568cf (patch)
tree5abcd2a0804e27e19d754853f82abf5c1b835f02 /src/rtos/rtkernel.c
parentccc5c1642b32ab79d5ab315e4b308e53392a77c4 (diff)
downloadriscv-openocd-fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf.zip
riscv-openocd-fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf.tar.gz
riscv-openocd-fbea7d5d38d0dcbdd71cb574da9bd12c78b568cf.tar.bz2
openocd: drop include of target_type.h
Few files include target_type.h even if it is not needed. Drop the include. Other files access directly to target type's name instead of using the proper API target_type_name(). Use the API and drop the include. Change-Id: I86c0e0bbad51db93500c0efa27b7d6f1a67a02c2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8260 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/rtos/rtkernel.c')
-rw-r--r--src/rtos/rtkernel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rtos/rtkernel.c b/src/rtos/rtkernel.c
index ba1de25..aebbf3d 100644
--- a/src/rtos/rtkernel.c
+++ b/src/rtos/rtkernel.c
@@ -12,7 +12,6 @@
#include <helper/time_support.h>
#include <jtag/jtag.h>
#include "target/target.h"
-#include "target/target_type.h"
#include "rtos.h"
#include "helper/log.h"
#include "helper/types.h"
@@ -363,7 +362,7 @@ static bool rtkernel_detect_rtos(struct target *target)
static int rtkernel_create(struct target *target)
{
for (size_t i = 0; i < ARRAY_SIZE(rtkernel_params_list); i++) {
- if (strcmp(rtkernel_params_list[i].target_name, target->type->name) == 0) {
+ if (strcmp(rtkernel_params_list[i].target_name, target_type_name(target)) == 0) {
target->rtos->rtos_specific_params = (void *)&rtkernel_params_list[i];
return 0;
}