]> git.sur5r.net Git - openocd/commitdiff
str9x_flash_bank_t -> struct str9x_flash_bank
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 15:39:12 +0000 (07:39 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:07 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct str9x_flash_bank.

src/flash/str9x.c
src/flash/str9x.h

index 711758289a2061cb6baf08ac9bd43ae7d986fd0c..77f9ddfd7742474a3e7ece22d639c33d0e58e225 100644 (file)
@@ -35,7 +35,7 @@ static uint32_t bank1start = 0x00080000;
 
 static int str9x_build_block_list(struct flash_bank_s *bank)
 {
-       str9x_flash_bank_t *str9x_info = bank->driver_priv;
+       struct str9x_flash_bank *str9x_info = bank->driver_priv;
 
        int i;
        int num_sectors;
@@ -118,7 +118,7 @@ static int str9x_build_block_list(struct flash_bank_s *bank)
  */
 FLASH_BANK_COMMAND_HANDLER(str9x_flash_bank_command)
 {
-       str9x_flash_bank_t *str9x_info;
+       struct str9x_flash_bank *str9x_info;
 
        if (argc < 6)
        {
@@ -126,7 +126,7 @@ FLASH_BANK_COMMAND_HANDLER(str9x_flash_bank_command)
                return ERROR_FLASH_BANK_INVALID;
        }
 
-       str9x_info = malloc(sizeof(str9x_flash_bank_t));
+       str9x_info = malloc(sizeof(struct str9x_flash_bank));
        bank->driver_priv = str9x_info;
 
        str9x_build_block_list(bank);
@@ -139,7 +139,7 @@ FLASH_BANK_COMMAND_HANDLER(str9x_flash_bank_command)
 static int str9x_protect_check(struct flash_bank_s *bank)
 {
        int retval;
-       str9x_flash_bank_t *str9x_info = bank->driver_priv;
+       struct str9x_flash_bank *str9x_info = bank->driver_priv;
        target_t *target = bank->target;
 
        int i;
@@ -348,7 +348,7 @@ static int str9x_protect(struct flash_bank_s *bank,
 static int str9x_write_block(struct flash_bank_s *bank,
                uint8_t *buffer, uint32_t offset, uint32_t count)
 {
-       str9x_flash_bank_t *str9x_info = bank->driver_priv;
+       struct str9x_flash_bank *str9x_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t buffer_size = 8192;
        working_area_t *source;
@@ -632,7 +632,7 @@ static int str9x_info(struct flash_bank_s *bank, char *buf, int buf_size)
 
 COMMAND_HANDLER(str9x_handle_flash_config_command)
 {
-       str9x_flash_bank_t *str9x_info;
+       struct str9x_flash_bank *str9x_info;
        target_t *target = NULL;
 
        if (argc < 5)
index 834488549afba313d4a41579a7d23470db8bbf2b..693851487db646985075731fe8a315b1575c56ad 100644 (file)
 
 #include "flash.h"
 
-typedef struct str9x_flash_bank_s
+struct str9x_flash_bank
 {
        uint32_t *sector_bits;
        int variant;
        int bank1;
        working_area_t *write_algorithm;
-} str9x_flash_bank_t;
+};
 
 enum str9x_status_codes
 {