diff options
Diffstat (limited to 'at45db.c')
-rw-r--r-- | at45db.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -80,9 +80,10 @@ static unsigned int at45db_get_sector_count(struct flashctx *flash) unsigned int i, j; unsigned int cnt = 0; for (i = 0; i < NUM_ERASEFUNCTIONS; i++) { - if (flash->chip->block_erasers[i].block_erase == SPI_ERASE_AT45DB_SECTOR) { + const struct block_eraser *const eraser = &flash->chip->block_erasers[i]; + if (eraser->block_erase == SPI_ERASE_AT45DB_SECTOR) { for (j = 0; j < NUM_ERASEREGIONS; j++) { - cnt += flash->chip->block_erasers[i].eraseblocks[j].count; + cnt += eraser->eraseblocks[j].count; } } } |