nor/flash: Add keep_alive() during flash write handler
[fw/openocd] / src / flash / nor / sim3x.c
index f282ba0897033c28b50e884c0fa4327be403bf13..4e39705fd44391b84b194134329db93ce417d205 100644 (file)
@@ -471,7 +471,7 @@ static int sim3x_write_block(struct flash_bank *bank, const uint8_t *buf,
        return ret;
 }
 
-static int sim3x_flash_write(struct flash_bank *bank, const uint8_t * buffer, uint32_t offset, uint32_t count)
+static int sim3x_flash_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 {
        int ret;
        struct target *target;
@@ -1110,7 +1110,7 @@ static const struct command_registration sim3x_command_handlers[] = {
        COMMAND_REGISTRATION_DONE
 };
 
-struct flash_driver sim3x_flash = {
+const struct flash_driver sim3x_flash = {
        .name = "sim3x",
        .commands = sim3x_command_handlers,
        .flash_bank_command = sim3x_flash_bank_command,