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>
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include <helper/types.h>
|
||||
#include <rtos/rtos.h>
|
||||
#include <target/target.h>
|
||||
#include <target/target_type.h>
|
||||
|
||||
#include "rtos_ucos_iii_stackings.h"
|
||||
|
||||
@@ -253,7 +252,7 @@ static int ucos_iii_create(struct target *target)
|
||||
struct ucos_iii_private *params;
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(ucos_iii_params_list); i++)
|
||||
if (strcmp(ucos_iii_params_list[i].target_name, target->type->name) == 0) {
|
||||
if (strcmp(ucos_iii_params_list[i].target_name, target_type_name(target)) == 0) {
|
||||
params = calloc(1, sizeof(*params));
|
||||
if (!params) {
|
||||
LOG_ERROR("uCOS-III: out of memory");
|
||||
@@ -268,7 +267,7 @@ static int ucos_iii_create(struct target *target)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
LOG_ERROR("uCOS-III: target not supported: %s", target->type->name);
|
||||
LOG_ERROR("uCOS-III: target not supported: %s", target_type_name(target));
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user