From dfecfd5fd471708ac15af08b52964e8f8da9f4be Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Fri, 13 Nov 2009 09:46:21 -0800 Subject: image_t -> struct image Remove misleading typedef and redundant suffix from struct image. Also removes the typedef from enum image_type, as it is used in image.h only. --- src/flash/ecos.c | 2 +- src/flash/flash.c | 8 ++++---- src/flash/flash.h | 4 ++-- src/flash/lpc2900.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/flash') diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 450bd5b7..57df1e7f 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -153,7 +153,7 @@ static int loadDriver(struct ecosflash_flash_bank *info) { uint32_t buf_cnt; uint32_t image_size; - image_t image; + struct image image; image.base_address_set = 0; image.start_address_set = 0; diff --git a/src/flash/flash.c b/src/flash/flash.c index 22e27215..a8da5565 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -31,7 +31,7 @@ #include "image.h" #include "time_support.h" -static int flash_write_unlock(target_t *target, image_t *image, uint32_t *written, int erase, bool unlock); +static int flash_write_unlock(target_t *target, struct image *image, uint32_t *written, int erase, bool unlock); /* flash drivers */ @@ -617,7 +617,7 @@ COMMAND_HANDLER(handle_flash_write_image_command) { target_t *target = get_current_target(cmd_ctx); - image_t image; + struct image image; uint32_t written; int retval; @@ -966,7 +966,7 @@ static int flash_unlock_address_range(target_t *target, uint32_t addr, uint32_t /* write (optional verify) an image to flash memory of the given target */ -static int flash_write_unlock(target_t *target, image_t *image, uint32_t *written, int erase, bool unlock) +static int flash_write_unlock(target_t *target, struct image *image, uint32_t *written, int erase, bool unlock) { int retval = ERROR_OK; @@ -1125,7 +1125,7 @@ static int flash_write_unlock(target_t *target, image_t *image, uint32_t *writte return retval; } -int flash_write(target_t *target, image_t *image, uint32_t *written, int erase) +int flash_write(target_t *target, struct image *image, uint32_t *written, int erase) { return flash_write_unlock(target, image, written, erase, false); } diff --git a/src/flash/flash.h b/src/flash/flash.h index 9cd59232..eeacc756 100644 --- a/src/flash/flash.h +++ b/src/flash/flash.h @@ -29,7 +29,7 @@ #include "target.h" #include "log.h" -struct image_s; +struct image; #define FLASH_MAX_ERROR_STR (128) @@ -286,7 +286,7 @@ int flash_erase_address_range(struct target_s *target, * @returns ERROR_OK if successful; otherwise, an error code. */ int flash_write(struct target_s *target, - struct image_s *image, uint32_t *written, int erase); + struct image *image, uint32_t *written, int erase); /** * Forces targets to re-examine their erase/protection state. * This routine must be called when the system may modify the status. diff --git a/src/flash/lpc2900.c b/src/flash/lpc2900.c index 08879077..5b6a5be4 100644 --- a/src/flash/lpc2900.c +++ b/src/flash/lpc2900.c @@ -718,7 +718,7 @@ COMMAND_HANDLER(lpc2900_handle_write_custom_command) } /* The image will always start at offset 0 */ - image_t image; + struct image image; image.base_address_set = 1; image.base_address = 0; image.start_address_set = 0; -- cgit v1.2.3