From 39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Mon, 9 Nov 2009 23:20:34 -0800 Subject: remove more useless declarations Removes forward declarations by moving command registration after defintion of the command handlers. --- src/target/etb.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/target') 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; -- cgit v1.2.3