helper/command: change prototype of command_print/command_print_sameline
[fw/openocd] / src / flash / nor / lpc2000.c
index 58afd79ac650a31f97c2669f29ea76902f475396..2a69af6920e760d284f17c2331ba4ef65486985b 100644 (file)
@@ -1579,11 +1579,11 @@ COMMAND_HANDLER(lpc2000_handle_part_id_command)
        int status_code = get_lpc2000_part_id(bank, &part_id);
        if (status_code != 0x0) {
                if (status_code == ERROR_FLASH_OPERATION_FAILED) {
-                       command_print(CMD_CTX, "no sufficient working area specified, can't access LPC2000 IAP interface");
+                       command_print(CMD, "no sufficient working area specified, can't access LPC2000 IAP interface");
                } else
-                       command_print(CMD_CTX, "lpc2000 IAP returned status code %i", status_code);
+                       command_print(CMD, "lpc2000 IAP returned status code %i", status_code);
        } else
-               command_print(CMD_CTX, "lpc2000 part id: 0x%8.8" PRIx32, part_id);
+               command_print(CMD, "lpc2000 part id: 0x%8.8" PRIx32, part_id);
 
        return retval;
 }
@@ -1609,7 +1609,7 @@ static const struct command_registration lpc2000_command_handlers[] = {
        COMMAND_REGISTRATION_DONE
 };
 
-struct flash_driver lpc2000_flash = {
+const struct flash_driver lpc2000_flash = {
        .name = "lpc2000",
        .commands = lpc2000_command_handlers,
        .flash_bank_command = lpc2000_flash_bank_command,