X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fstr9x.c;h=711758289a2061cb6baf08ac9bd43ae7d986fd0c;hp=665c1607cccd011c9ccf896f9eb66b6668f9288e;hb=632fd663a821047df9a9b965ec1c35d6b034ebba;hpb=cfc4d5c6b7b6f8f82dc5bbf3ee661c179814666e
diff --git a/src/flash/str9x.c b/src/flash/str9x.c
index 665c1607cc..711758289a 100644
--- a/src/flash/str9x.c
+++ b/src/flash/str9x.c
@@ -83,7 +83,7 @@ static int str9x_build_block_list(struct flash_bank_s *bank)
num_sectors = b0_sectors + b1_sectors;
bank->num_sectors = num_sectors;
- bank->sectors = malloc(sizeof(flash_sector_t) * num_sectors);
+ bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
str9x_info->sector_bits = malloc(sizeof(uint32_t) * num_sectors);
num_sectors = 0;
@@ -116,8 +116,7 @@ static int str9x_build_block_list(struct flash_bank_s *bank)
/* flash bank str9x 0 0
*/
-static int str9x_flash_bank_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc, struct flash_bank_s *bank)
+FLASH_BANK_COMMAND_HANDLER(str9x_flash_bank_command)
{
str9x_flash_bank_t *str9x_info;
@@ -688,7 +687,7 @@ static int str9x_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
-flash_driver_t str9x_flash = {
+struct flash_driver str9x_flash = {
.name = "str9x",
.register_commands = &str9x_register_commands,
.flash_bank_command = &str9x_flash_bank_command,