]> git.sur5r.net Git - openocd/commitdiff
arm-jtag-ew: use register_commands()
authorZachary T Welch <zw@superlucidity.net>
Sat, 21 Nov 2009 03:56:02 +0000 (19:56 -0800)
committerZachary T Welch <zw@superlucidity.net>
Wed, 25 Nov 2009 05:37:33 +0000 (21:37 -0800)
Uses register_commands() with command registration array.

src/jtag/arm-jtag-ew.c

index f239371302cad6dc6a3007c3261b0fe4b0b21e44..ef2b04f2a153d0cd67cf404011a9252314dce1ee 100644 (file)
@@ -502,12 +502,19 @@ COMMAND_HANDLER(armjtagew_handle_armjtagew_info_command)
        return ERROR_OK;
 }
 
+static const struct command_registration armjtagew_command_handlers[] = {
+       {
+               .name = "armjtagew_info",
+               .handler = &armjtagew_handle_armjtagew_info_command,
+               .mode = COMMAND_EXEC,
+               .help = "query armjtagew info",
+       },
+       COMMAND_REGISTRATION_DONE
+};
+
 static int armjtagew_register_commands(struct command_context *cmd_ctx)
 {
-       COMMAND_REGISTER(cmd_ctx, NULL, "armjtagew_info",
-                       &armjtagew_handle_armjtagew_info_command, COMMAND_EXEC,
-                       "query armjtagew info");
-       return ERROR_OK;
+       return register_commands(cmd_ctx, NULL, armjtagew_command_handlers);
 }
 
 struct jtag_interface armjtagew_interface = {