flash_driver_t -> struct flash_driver
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 15:38:01 +0000 (07:38 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:06 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct flash_driver.

22 files changed:
src/ecosboard.c
src/flash/aduc702x.c
src/flash/at91sam3.c
src/flash/at91sam3.h
src/flash/at91sam7.c
src/flash/avrf.c
src/flash/cfi.c
src/flash/ecos.c
src/flash/faux.c
src/flash/flash.c
src/flash/flash.h
src/flash/lpc2000.c
src/flash/lpc288x.c
src/flash/lpc2900.c
src/flash/ocl.c
src/flash/pic32mx.c
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/str7x.c
src/flash/str9x.c
src/flash/str9xpec.c
src/flash/tms470.c

index b0f9525..8d85fe6 100644 (file)
@@ -114,7 +114,7 @@ static bool writeLog = true;
 char hwaddr[512];
 
 
-extern flash_driver_t *flash_drivers[];
+extern struct flash_driver *flash_drivers[];
 extern target_type_t *target_types[];
 
 #ifdef CYGPKG_PROFILE_GPROF
index 61ea36a..c17335e 100644 (file)
@@ -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,
index 7e6b456..335f8ab 100644 (file)
@@ -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,
index cea4c3a..4fa7f46 100644 (file)
@@ -20,4 +20,4 @@
 
 
 // nothing to do here other then export this.
-extern flash_driver_t at91sam3_flash;
+extern struct flash_driver at91sam3_flash;
index fd84e23..c0b516c 100644 (file)
@@ -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,
index fec21cb..8dd4339 100644 (file)
@@ -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,
index a3187fe..3fa4917 100644 (file)
@@ -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,
index b508cb1..5a0d7ec 100644 (file)
@@ -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,
index b7622f3..52d3728 100644 (file)
@@ -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,
index 2abd8c4..22e2721 100644 (file)
@@ -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,
index d4abcde..9cd5923 100644 (file)
@@ -82,7 +82,7 @@ struct flash_bank_s;
  * corresponding static <code>flash_driver_<i>callback</i>()</code>
  * 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. */
index 308a25c..27eec7f 100644 (file)
@@ -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,
index 52d31a8..d681fbf 100644 (file)
@@ -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,
index fd265bd..0f972be 100644 (file)
@@ -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,
index 239f9f5..bd7577e 100644 (file)
@@ -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,
index 438630a..18dfa97 100644 (file)
@@ -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,
index dc35c59..9bd329d 100644 (file)
@@ -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,
index 8725fad..eab9708 100644 (file)
@@ -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,
index dbb5872..1b4056b 100644 (file)
@@ -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,
index caabd99..7117582 100644 (file)
@@ -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,
index 6b85e6a..aa19b75 100644 (file)
@@ -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,
index 75b233d..4149d9c 100644 (file)
@@ -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,