From 3c44e12a287ce9a91cf97c3303bf4222f63d25c7 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Wed, 2 Nov 2022 12:15:38 +1100 Subject: tree/: Convert flashchips db to use indirection for erase_block This paves the way to allow for the conversion of flashchip erase_block func ptr to enumerate values. This change should be a NOP. TEST=`diff -u <(objdump -D flashchips.o_bk) <(objdump -D flashchips.o)`. Change-Id: I122295ec9add0fe0efd27273c9725e5d64f6dbe2 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/69131 Reviewed-by: Angel Pons Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- at45db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'at45db.c') diff --git a/at45db.c b/at45db.c index 992f3a4f..53e15ec8 100644 --- a/at45db.c +++ b/at45db.c @@ -80,7 +80,7 @@ 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) { + if (flash->chip->block_erasers[i].block_erase == SPI_ERASE_AT45DB_SECTOR) { for (j = 0; j < NUM_ERASEREGIONS; j++) { cnt += flash->chip->block_erasers[i].eraseblocks[j].count; } -- cgit v1.2.3