remove more useless declarations

Removes forward declarations by moving command registration after
defintion of the command handlers.
This commit is contained in:
Zachary T Welch
2009-11-09 23:20:34 -08:00
parent e997431602
commit 39ab1c1a41
5 changed files with 62 additions and 97 deletions

View File

@@ -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;