diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-10-10 16:10:49 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-10-10 16:10:49 +0000 |
commit | fe507f3b24e9bbae177147c5bf601268f2e3a52c (patch) | |
tree | f5df1cca0b51c3227a47aa5968c816abcba49682 /sst28sf040.c | |
parent | ddadc3eacbb77e64761dabce03fa486358154d41 (diff) | |
download | flashrom-fe507f3b24e9bbae177147c5bf601268f2e3a52c.zip flashrom-fe507f3b24e9bbae177147c5bf601268f2e3a52c.tar.gz |
Simplify calls to inner write functions
No behavioural changes, just equivalence transformations.
Corresponding to flashrom svn r1209.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'sst28sf040.c')
-rw-r--r-- | sst28sf040.c | 8 |
1 files changed, 1 insertions, 7 deletions
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); |