From: Zachary T Welch Date: Sat, 21 Nov 2009 04:11:58 +0000 (-0800) Subject: gw16012: use register_commands() X-Git-Tag: v0.4.0-rc1~389 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=779bdbe797b9c25b9f297b4f29500e847baf28c3;p=openocd gw16012: use register_commands() Use register_commands() with command registration array. --- diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c index bc0e4724..0e495f92 100644 --- a/src/jtag/gw16012.c +++ b/src/jtag/gw16012.c @@ -562,13 +562,20 @@ COMMAND_HANDLER(gw16012_handle_parport_port_command) return ERROR_OK; } +static const struct command_registration gw16012_command_handlers[] = { + { + .name = "parport_port", + .handler = &gw16012_handle_parport_port_command, + .mode = COMMAND_CONFIG, + .help = "configure the parallel port to use", + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static int gw16012_register_commands(struct command_context *cmd_ctx) { - COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", - gw16012_handle_parport_port_command, COMMAND_CONFIG, - NULL); - - return ERROR_OK; + return register_commands(cmd_ctx, NULL, gw16012_command_handlers); } struct jtag_interface gw16012_interface = {