diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-09 23:20:34 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-11 11:53:22 -0800 |
commit | 39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb (patch) | |
tree | bd3b863ba2f019b26f16cacce6fc31caf17dbf1a /src/target | |
parent | e9974316027097ff7984924676d70d33b7b674ed (diff) | |
download | openocd_libswd-39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb.tar.gz openocd_libswd-39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb.tar.bz2 openocd_libswd-39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb.tar.xz openocd_libswd-39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb.zip |
remove more useless declarations
Removes forward declarations by moving command registration after
defintion of the command handlers.
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/etb.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/target/etb.c b/src/target/etb.c index 5b81895d..41312bed 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -42,8 +42,6 @@ static int etb_reg_arch_type = -1; static int etb_get_reg(reg_t *reg); -static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); - static int etb_set_instr(etb_t *etb, uint32_t new_instr) { jtag_tap_t *tap; @@ -351,17 +349,6 @@ static int etb_write_reg(reg_t *reg, uint32_t value) return ERROR_OK; } -static int etb_register_commands(struct command_context_s *cmd_ctx) -{ - command_t *etb_cmd; - - etb_cmd = register_command(cmd_ctx, NULL, "etb", NULL, COMMAND_ANY, "Embedded Trace Buffer"); - - register_command(cmd_ctx, etb_cmd, "config", handle_etb_config_command, COMMAND_CONFIG, NULL); - - return ERROR_OK; -} - static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { target_t *target; @@ -416,6 +403,18 @@ static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cm return ERROR_OK; } +static int etb_register_commands(struct command_context_s *cmd_ctx) +{ + command_t *etb_cmd = register_command(cmd_ctx, NULL, "etb", + NULL, COMMAND_ANY, "Embedded Trace Buffer"); + + register_command(cmd_ctx, etb_cmd, "config", + handle_etb_config_command, COMMAND_CONFIG, + NULL); + + return ERROR_OK; +} + static int etb_init(etm_context_t *etm_ctx) { etb_t *etb = etm_ctx->capture_driver_priv; |