summaryrefslogtreecommitdiffstats
path: root/sst49lfxxxc.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-10-10 16:10:49 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-10-10 16:10:49 +0000
commitfe507f3b24e9bbae177147c5bf601268f2e3a52c (patch)
treef5df1cca0b51c3227a47aa5968c816abcba49682 /sst49lfxxxc.c
parentddadc3eacbb77e64761dabce03fa486358154d41 (diff)
downloadflashrom-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 'sst49lfxxxc.c')
-rw-r--r--sst49lfxxxc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index ec7d3da..c682be3 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -78,15 +78,10 @@ int erase_sector_49lfxxxc(struct flashchip *flash, unsigned int address, unsigne
int write_49lfxxxc(struct flashchip *flash, uint8_t *buf)
{
- int i;
- int total_size = flash->total_size * 1024;
- int page_size = flash->page_size;
chipaddr bios = flash->virtual_memory;
write_lockbits_49lfxxxc(flash, 0);
- for (i = 0; i < total_size / page_size; i++) {
- write_page_82802ab(flash, buf + i * page_size, i * page_size, page_size);
- }
+ write_page_82802ab(flash, buf, 0, flash->total_size * 1024);
chip_writeb(0xFF, bios);
OpenPOWER on IntegriCloud