From 9ea2be2d2ae2b64591aa0ebd973563800d3e527a Mon Sep 17 00:00:00 2001 From: hailfinger Date: Sun, 10 Oct 2010 16:10:49 +0000 Subject: Simplify calls to inner write functions. No behavioural changes, just equivalence transformations. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1209 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- sst28sf040.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'sst28sf040.c') diff --git a/sst28sf040.c b/sst28sf040.c index 2de876b..ba22093 100644 --- a/sst28sf040.c +++ b/sst28sf040.c @@ -118,15 +118,9 @@ static int erase_28sf040(struct flashchip *flash) int write_28sf040(struct flashchip *flash, uint8_t *buf) { - int i; - int total_size = flash->total_size * 1024; - int page_size = flash->page_size; - unprotect_28sf040(flash); - for (i = 0; i < total_size / page_size; i++) { - write_sector_28sf040(flash, buf + i * page_size, i * page_size, page_size); - } + write_sector_28sf040(flash, buf, 0, flash->total_size * 1024); protect_28sf040(flash); -- cgit v1.2.1