summaryrefslogtreecommitdiff
path: root/src/target/arm7_9_common.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-23 08:17:01 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-24 21:37:36 -0800
commit66ee303456910f684244a20a0ac2e958d40b78cb (patch)
tree3a5f06b0ee9e3978ebc9d836aac622b752e251ad /src/target/arm7_9_common.c
parent144e3678bd2d518388b6c2d7f3d2a912a9ac2abd (diff)
downloadopenocd_libswd-66ee303456910f684244a20a0ac2e958d40b78cb.tar.gz
openocd_libswd-66ee303456910f684244a20a0ac2e958d40b78cb.tar.bz2
openocd_libswd-66ee303456910f684244a20a0ac2e958d40b78cb.tar.xz
openocd_libswd-66ee303456910f684244a20a0ac2e958d40b78cb.zip
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/arm7_9_common.c')
-rw-r--r--src/target/arm7_9_common.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index b40be8d4..c4775e8a 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2873,7 +2873,13 @@ static const struct command_registration arm7_9_any_command_handlers[] = {
},
COMMAND_REGISTRATION_DONE
};
-static const struct command_registration arm7_9_command_handlers[] = {
+const struct command_registration arm7_9_command_handlers[] = {
+ {
+ .chain = arm_command_handlers,
+ },
+ {
+ .chain = etm_command_handlers,
+ },
{
.name = "arm7_9",
.mode = COMMAND_ANY,
@@ -2882,10 +2888,3 @@ static const struct command_registration arm7_9_command_handlers[] = {
},
COMMAND_REGISTRATION_DONE
};
-
-int arm7_9_register_commands(struct command_context *cmd_ctx)
-{
- armv4_5_register_commands(cmd_ctx);
- etm_register_commands(cmd_ctx);
- return register_commands(cmd_ctx, NULL, arm7_9_command_handlers);
-}