-static int gw16012_register_commands(struct command_context *cmd_ctx)
-{
- register_command(cmd_ctx, NULL, "parport_port",
- gw16012_handle_parport_port_command, COMMAND_CONFIG,
- NULL);
-
- 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 = "<port_num>",
+ },
+ COMMAND_REGISTRATION_DONE
+};