X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Flpc288x.c;h=d681fbf9ea69ce3e0cf54f385e08506f197fc9f2;hp=36444fb1a4e0e4dc8c6ffa784c82ef6518820c73;hb=632fd663a821047df9a9b965ec1c35d6b034ebba;hpb=39ab1c1a41cf6adfaeb936931a771e6b2d5fbdcb diff --git a/src/flash/lpc288x.c b/src/flash/lpc288x.c index 36444fb1a4..d681fbf9ea 100644 --- a/src/flash/lpc288x.c +++ b/src/flash/lpc288x.c @@ -137,7 +137,7 @@ static int lpc288x_read_part_info(struct flash_bank_s *bank) /* setup the sector info... */ offset = bank->base; bank->num_sectors = 23; - bank->sectors = malloc(sizeof(flash_sector_t) * 23); + bank->sectors = malloc(sizeof(struct flash_sector) * 23); for (i = 0; i < 15; i++) { @@ -165,7 +165,7 @@ static int lpc288x_protect_check(struct flash_bank_s *bank) } /* flash_bank LPC288x 0 0 0 0 */ -static int lpc288x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +FLASH_BANK_COMMAND_HANDLER(lpc288x_flash_bank_command) { lpc288x_flash_bank_t *lpc288x_info; @@ -471,7 +471,7 @@ static int lpc288x_protect(struct flash_bank_s *bank, int set, int first, int la return ERROR_OK; } -flash_driver_t lpc288x_flash = { +struct flash_driver lpc288x_flash = { .name = "lpc288x", .flash_bank_command = &lpc288x_flash_bank_command, .erase = &lpc288x_erase,