forked from auracaster/openocd
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:
@@ -40,7 +40,6 @@
|
||||
|
||||
/* START_DEPRECATED_TPIU */
|
||||
#include <target/cortex_m.h>
|
||||
#include <target/target_type.h>
|
||||
#define MSG "DEPRECATED \'tpiu config\' command: "
|
||||
/* END_DEPRECATED_TPIU */
|
||||
|
||||
@@ -645,8 +644,8 @@ COMMAND_HANDLER(handle_arm_tpiu_swo_enable)
|
||||
|
||||
/* START_DEPRECATED_TPIU */
|
||||
if (obj->recheck_ap_cur_target) {
|
||||
if (strcmp(target->type->name, "cortex_m") &&
|
||||
strcmp(target->type->name, "hla_target")) {
|
||||
if (strcmp(target_type_name(target), "cortex_m") &&
|
||||
strcmp(target_type_name(target), "hla_target")) {
|
||||
LOG_ERROR(MSG "Current target is not a Cortex-M nor a HLA");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
@@ -1043,8 +1042,8 @@ COMMAND_HANDLER(handle_tpiu_deprecated_config_command)
|
||||
struct arm_tpiu_swo_object *obj = NULL;
|
||||
int retval;
|
||||
|
||||
if (strcmp(target->type->name, "cortex_m") &&
|
||||
strcmp(target->type->name, "hla_target")) {
|
||||
if (strcmp(target_type_name(target), "cortex_m") &&
|
||||
strcmp(target_type_name(target), "hla_target")) {
|
||||
LOG_ERROR(MSG "Current target is not a Cortex-M nor a HLA");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user