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/arm966e.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/arm966e.c')
-rw-r--r-- | src/target/arm966e.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/target/arm966e.c b/src/target/arm966e.c index 70cc3c4b..9fe513c9 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -232,7 +232,10 @@ static const struct command_registration arm966e_exec_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -static const struct command_registration arm966e_command_handlers[] = { +const struct command_registration arm966e_command_handlers[] = { + { + .chain = arm9tdmi_command_handlers, + }, { .name = "arm966e", .mode = COMMAND_ANY, @@ -242,13 +245,6 @@ static const struct command_registration arm966e_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -/** Registers commands used to access coprocessor resources. */ -int arm966e_register_commands(struct command_context *cmd_ctx) -{ - arm9tdmi_register_commands(cmd_ctx); - return register_commands(cmd_ctx, NULL, arm966e_command_handlers); -} - /** Holds methods for ARM966 targets. */ struct target_type arm966e_target = { @@ -283,7 +279,7 @@ struct target_type arm966e_target = .add_watchpoint = arm7_9_add_watchpoint, .remove_watchpoint = arm7_9_remove_watchpoint, - .register_commands = arm966e_register_commands, + .commands = arm966e_command_handlers, .target_create = arm966e_target_create, .init_target = arm9tdmi_init_target, .examine = arm7_9_examine, |