diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-23 08:17:01 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:36 -0800 |
commit | 66ee303456910f684244a20a0ac2e958d40b78cb (patch) | |
tree | 3a5f06b0ee9e3978ebc9d836aac622b752e251ad /src/target/xscale.c | |
parent | 144e3678bd2d518388b6c2d7f3d2a912a9ac2abd (diff) |
remove target_type register_command callback
Uses chaining of command_registration structures to eliminate all
target_type register_callback routines. Exports the command_handler
registration arrays for those target types that are used by others.
Diffstat (limited to 'src/target/xscale.c')
-rw-r--r-- | src/target/xscale.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c index 965ac52e..e402a11c 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -3653,6 +3653,9 @@ static const struct command_registration xscale_any_command_handlers[] = { }; static const struct command_registration xscale_command_handlers[] = { { + .chain = arm_command_handlers, + }, + { .name = "xscale", .mode = COMMAND_ANY, .help = "xscale command group", @@ -3661,14 +3664,6 @@ static const struct command_registration xscale_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -static int xscale_register_commands(struct command_context *cmd_ctx) -{ - - armv4_5_register_commands(cmd_ctx); - - return ERROR_OK; -} - struct target_type xscale_target = { .name = "xscale", @@ -3702,7 +3697,7 @@ struct target_type xscale_target = .add_watchpoint = xscale_add_watchpoint, .remove_watchpoint = xscale_remove_watchpoint, - .register_commands = xscale_register_commands, + .commands = xscale_command_handlers, .target_create = xscale_target_create, .init_target = xscale_init_target, |