summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-06-16 06:54:58 +0000
committerTomek CEDRO <cederom@tlen.pl>2011-06-16 06:54:58 +0000
commit4c317cb3923a2f645b2379cc4dc7d8b2eba2f6d7 (patch)
treeb3beb5346b3986c8ff45ca0d763b587511b0ff7a /src
parent5a0b2d476daaf1bff73eb36a7be25173fdfc6bd9 (diff)
downloadopenocd+libswd-4c317cb3923a2f645b2379cc4dc7d8b2eba2f6d7.tar.gz
openocd+libswd-4c317cb3923a2f645b2379cc4dc7d8b2eba2f6d7.tar.bz2
openocd+libswd-4c317cb3923a2f645b2379cc4dc7d8b2eba2f6d7.tar.xz
openocd+libswd-4c317cb3923a2f645b2379cc4dc7d8b2eba2f6d7.zip
ADAPTER: Fixed transport selection mechanism to support transports other than jtag (if defined).
Diffstat (limited to 'src')
-rw-r--r--src/jtag/adapter.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index 94843d7d..a0cd5e3d 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -47,8 +47,7 @@
*/
extern struct jtag_interface *jtag_interface;
-
-
+const char *jtag_only[] = { "jtag", NULL };
static int
jim_adapter_name(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
@@ -93,9 +92,6 @@ static int default_srst_asserted(int *srst_asserted)
return ERROR_OK;
}
-const char *jtag_only[] = { "jtag", NULL, };
-
-
COMMAND_HANDLER(interface_transport_command)
{
char **transports;
@@ -169,9 +165,8 @@ COMMAND_HANDLER(handle_interface_command)
LOG_WARNING("Adapter driver '%s' did not declare "
"which transports it allows; assuming "
"legacy JTAG-only", jtag_interface->name);
- retval = allow_transports(CMD_CTX,
- jtag_interface->transports
- ? : jtag_only);
+ retval = allow_transports(CMD_CTX, jtag_interface->transports
+ ? jtag_interface->transports : jtag_only);
if (ERROR_OK != retval)
return retval;