From 632fd663a821047df9a9b965ec1c35d6b034ebba Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Fri, 13 Nov 2009 07:38:01 -0800 Subject: flash_driver_t -> struct flash_driver Remove misleading typedef and redundant suffix from struct flash_driver. --- src/flash/aduc702x.c | 2 +- src/flash/at91sam3.c | 2 +- src/flash/at91sam3.h | 2 +- src/flash/at91sam7.c | 2 +- src/flash/avrf.c | 2 +- src/flash/cfi.c | 2 +- src/flash/ecos.c | 2 +- src/flash/faux.c | 2 +- src/flash/flash.c | 40 ++++++++++++++++++++-------------------- src/flash/flash.h | 6 +++--- src/flash/lpc2000.c | 2 +- src/flash/lpc288x.c | 2 +- src/flash/lpc2900.c | 2 +- src/flash/ocl.c | 2 +- src/flash/pic32mx.c | 2 +- src/flash/stellaris.c | 2 +- src/flash/stm32x.c | 2 +- src/flash/str7x.c | 2 +- src/flash/str9x.c | 2 +- src/flash/str9xpec.c | 2 +- src/flash/tms470.c | 2 +- 21 files changed, 42 insertions(+), 42 deletions(-) (limited to 'src/flash') diff --git a/src/flash/aduc702x.c b/src/flash/aduc702x.c index 61ea36a9..c17335e1 100644 --- a/src/flash/aduc702x.c +++ b/src/flash/aduc702x.c @@ -422,7 +422,7 @@ static int aduc702x_check_flash_completion(target_t* target, unsigned int timeou else return ERROR_OK; } -flash_driver_t aduc702x_flash = { +struct flash_driver aduc702x_flash = { .name = "aduc702x", .flash_bank_command = &aduc702x_flash_bank_command, .erase = &aduc702x_erase, diff --git a/src/flash/at91sam3.c b/src/flash/at91sam3.c index 7e6b4567..335f8ab5 100644 --- a/src/flash/at91sam3.c +++ b/src/flash/at91sam3.c @@ -2500,7 +2500,7 @@ sam3_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t at91sam3_flash = { +struct flash_driver at91sam3_flash = { .name = "at91sam3", .register_commands = &sam3_register_commands, .flash_bank_command = &sam3_flash_bank_command, diff --git a/src/flash/at91sam3.h b/src/flash/at91sam3.h index cea4c3ab..4fa7f467 100644 --- a/src/flash/at91sam3.h +++ b/src/flash/at91sam3.h @@ -20,4 +20,4 @@ // nothing to do here other then export this. -extern flash_driver_t at91sam3_flash; +extern struct flash_driver at91sam3_flash; diff --git a/src/flash/at91sam7.c b/src/flash/at91sam7.c index fd84e231..c0b516c3 100644 --- a/src/flash/at91sam7.c +++ b/src/flash/at91sam7.c @@ -1191,7 +1191,7 @@ static int at91sam7_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t at91sam7_flash = { +struct flash_driver at91sam7_flash = { .name = "at91sam7", .register_commands = &at91sam7_register_commands, .flash_bank_command = &at91sam7_flash_bank_command, diff --git a/src/flash/avrf.c b/src/flash/avrf.c index fec21cbd..8dd43398 100644 --- a/src/flash/avrf.c +++ b/src/flash/avrf.c @@ -461,7 +461,7 @@ static int avrf_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t avr_flash = { +struct flash_driver avr_flash = { .name = "avr", .register_commands = &avrf_register_commands, .flash_bank_command = &avrf_flash_bank_command, diff --git a/src/flash/cfi.c b/src/flash/cfi.c index a3187fe2..3fa49170 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -2626,7 +2626,7 @@ static int cfi_info(struct flash_bank_s *bank, char *buf, int buf_size) return ERROR_OK; } -flash_driver_t cfi_flash = { +struct flash_driver cfi_flash = { .name = "cfi", .register_commands = &cfi_register_commands, .flash_bank_command = &cfi_flash_bank_command, diff --git a/src/flash/ecos.c b/src/flash/ecos.c index b508cb12..5a0d7ec9 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -435,7 +435,7 @@ static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, cha } #endif -flash_driver_t ecosflash_flash = { +struct flash_driver ecosflash_flash = { .name = "ecosflash", .register_commands = &ecosflash_register_commands, .flash_bank_command = &ecosflash_flash_bank_command, diff --git a/src/flash/faux.c b/src/flash/faux.c index b7622f3b..52d37289 100644 --- a/src/flash/faux.c +++ b/src/flash/faux.c @@ -128,7 +128,7 @@ static int faux_probe(struct flash_bank_s *bank) return ERROR_OK; } -flash_driver_t faux_flash = { +struct flash_driver faux_flash = { .name = "faux", .register_commands = &faux_register_commands, .flash_bank_command = &faux_flash_bank_command, diff --git a/src/flash/flash.c b/src/flash/flash.c index 2abd8c43..22e27215 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -35,26 +35,26 @@ static int flash_write_unlock(target_t *target, image_t *image, uint32_t *writte /* flash drivers */ -extern flash_driver_t lpc2000_flash; -extern flash_driver_t lpc288x_flash; -extern flash_driver_t lpc2900_flash; -extern flash_driver_t cfi_flash; -extern flash_driver_t at91sam3_flash; -extern flash_driver_t at91sam7_flash; -extern flash_driver_t str7x_flash; -extern flash_driver_t str9x_flash; -extern flash_driver_t aduc702x_flash; -extern flash_driver_t stellaris_flash; -extern flash_driver_t str9xpec_flash; -extern flash_driver_t stm32x_flash; -extern flash_driver_t tms470_flash; -extern flash_driver_t ecosflash_flash; -extern flash_driver_t ocl_flash; -extern flash_driver_t pic32mx_flash; -extern flash_driver_t avr_flash; -extern flash_driver_t faux_flash; - -flash_driver_t *flash_drivers[] = { +extern struct flash_driver lpc2000_flash; +extern struct flash_driver lpc288x_flash; +extern struct flash_driver lpc2900_flash; +extern struct flash_driver cfi_flash; +extern struct flash_driver at91sam3_flash; +extern struct flash_driver at91sam7_flash; +extern struct flash_driver str7x_flash; +extern struct flash_driver str9x_flash; +extern struct flash_driver aduc702x_flash; +extern struct flash_driver stellaris_flash; +extern struct flash_driver str9xpec_flash; +extern struct flash_driver stm32x_flash; +extern struct flash_driver tms470_flash; +extern struct flash_driver ecosflash_flash; +extern struct flash_driver ocl_flash; +extern struct flash_driver pic32mx_flash; +extern struct flash_driver avr_flash; +extern struct flash_driver faux_flash; + +struct flash_driver *flash_drivers[] = { &lpc2000_flash, &lpc288x_flash, &lpc2900_flash, diff --git a/src/flash/flash.h b/src/flash/flash.h index d4abcde1..9cd59232 100644 --- a/src/flash/flash.h +++ b/src/flash/flash.h @@ -82,7 +82,7 @@ struct flash_bank_s; * corresponding static flash_driver_callback() * routine in flash.c. */ -typedef struct flash_driver_s +struct flash_driver { /** * Gives a human-readable name of this flash driver, @@ -224,7 +224,7 @@ typedef struct flash_driver_s * @returns ERROR_OK if successful; otherwise, an error code. */ int (*auto_probe)(struct flash_bank_s *bank); -} flash_driver_t; +}; #define FLASH_BANK_COMMAND_HANDLER(name) static __FLASH_BANK_COMMAND(name) @@ -242,7 +242,7 @@ typedef struct flash_bank_s { struct target_s *target; /**< Target to which this bank belongs. */ - flash_driver_t *driver; /**< Driver for this bank. */ + struct flash_driver *driver; /**< Driver for this bank. */ void *driver_priv; /**< Private driver storage pointer */ int bank_number; /**< The 'bank' (or chip number) of this instance. */ diff --git a/src/flash/lpc2000.c b/src/flash/lpc2000.c index 308a25cd..27eec7f3 100644 --- a/src/flash/lpc2000.c +++ b/src/flash/lpc2000.c @@ -788,7 +788,7 @@ static int lpc2000_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t lpc2000_flash = { +struct flash_driver lpc2000_flash = { .name = "lpc2000", .register_commands = &lpc2000_register_commands, .flash_bank_command = &lpc2000_flash_bank_command, diff --git a/src/flash/lpc288x.c b/src/flash/lpc288x.c index 52d31a8a..d681fbf9 100644 --- a/src/flash/lpc288x.c +++ b/src/flash/lpc288x.c @@ -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, diff --git a/src/flash/lpc2900.c b/src/flash/lpc2900.c index fd265bd7..0f972bed 100644 --- a/src/flash/lpc2900.c +++ b/src/flash/lpc2900.c @@ -1830,7 +1830,7 @@ static int lpc2900_info(struct flash_bank_s *bank, char *buf, int buf_size) } -flash_driver_t lpc2900_flash = +struct flash_driver lpc2900_flash = { .name = "lpc2900", .register_commands = lpc2900_register_commands, diff --git a/src/flash/ocl.c b/src/flash/ocl.c index 239f9f5c..bd7577e3 100644 --- a/src/flash/ocl.c +++ b/src/flash/ocl.c @@ -348,7 +348,7 @@ static int ocl_auto_probe(struct flash_bank_s *bank) return ERROR_OK; } -flash_driver_t ocl_flash = { +struct flash_driver ocl_flash = { .name = "ocl", .flash_bank_command = &ocl_flash_bank_command, .erase = &ocl_erase, diff --git a/src/flash/pic32mx.c b/src/flash/pic32mx.c index 438630a1..18dfa979 100644 --- a/src/flash/pic32mx.c +++ b/src/flash/pic32mx.c @@ -904,7 +904,7 @@ static int pic32mx_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t pic32mx_flash = { +struct flash_driver pic32mx_flash = { .name = "pic32mx", .register_commands = &pic32mx_register_commands, .flash_bank_command = &pic32mx_flash_bank_command, diff --git a/src/flash/stellaris.c b/src/flash/stellaris.c index dc35c59e..9bd329d1 100644 --- a/src/flash/stellaris.c +++ b/src/flash/stellaris.c @@ -1172,7 +1172,7 @@ static int stellaris_register_commands(struct command_context_s *cmd_ctx) } -flash_driver_t stellaris_flash = { +struct flash_driver stellaris_flash = { .name = "stellaris", .register_commands = &stellaris_register_commands, .flash_bank_command = &stellaris_flash_bank_command, diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index 8725fad6..eab9708b 100644 --- a/src/flash/stm32x.c +++ b/src/flash/stm32x.c @@ -1205,7 +1205,7 @@ static int stm32x_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t stm32x_flash = { +struct flash_driver stm32x_flash = { .name = "stm32x", .register_commands = &stm32x_register_commands, .flash_bank_command = &stm32x_flash_bank_command, diff --git a/src/flash/str7x.c b/src/flash/str7x.c index dbb58723..1b4056bd 100644 --- a/src/flash/str7x.c +++ b/src/flash/str7x.c @@ -683,7 +683,7 @@ static int str7x_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t str7x_flash = { +struct flash_driver str7x_flash = { .name = "str7x", .register_commands = &str7x_register_commands, .flash_bank_command = &str7x_flash_bank_command, diff --git a/src/flash/str9x.c b/src/flash/str9x.c index caabd993..71175828 100644 --- a/src/flash/str9x.c +++ b/src/flash/str9x.c @@ -687,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, diff --git a/src/flash/str9xpec.c b/src/flash/str9xpec.c index 6b85e6a1..aa19b75e 100644 --- a/src/flash/str9xpec.c +++ b/src/flash/str9xpec.c @@ -1205,7 +1205,7 @@ static int str9xpec_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -flash_driver_t str9xpec_flash = { +struct flash_driver str9xpec_flash = { .name = "str9xpec", .register_commands = &str9xpec_register_commands, .flash_bank_command = &str9xpec_flash_bank_command, diff --git a/src/flash/tms470.c b/src/flash/tms470.c index 75b233d9..4149d9ca 100644 --- a/src/flash/tms470.c +++ b/src/flash/tms470.c @@ -1236,7 +1236,7 @@ FLASH_BANK_COMMAND_HANDLER(tms470_flash_bank_command) return ERROR_OK; } -flash_driver_t tms470_flash = { +struct flash_driver tms470_flash = { .name = "tms470", .register_commands = &tms470_register_commands, .flash_bank_command = &tms470_flash_bank_command, -- cgit v1.2.3