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 --- 82802ab.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to '82802ab.c') diff --git a/82802ab.c b/82802ab.c index ac42bb9..2600642 100644 --- a/82802ab.c +++ b/82802ab.c @@ -162,13 +162,7 @@ int write_page_82802ab(struct flashchip *flash, uint8_t *src, int start, int len int write_82802ab(struct flashchip *flash, uint8_t *buf) { - int i; - - for (i = 0; i < flash->total_size; i++) { - write_page_82802ab(flash, buf + i * 1024, i * 1024, 1024); - } - - return 0; + return write_page_82802ab(flash, buf, 0, flash->total_size * 1024); } int unlock_28f004s5(struct flashchip *flash) -- cgit v1.2.1