From 8b4f8e04537b5c81c7fee45512fc594cb71525c7 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sat, 9 May 2009 07:32:30 +0000 Subject: Kill one superfluous variable and improve code readability Corresponding to flashrom svn r489. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Carl-Daniel Hailfinger --- flashrom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 3086cbee..d7f44791 100644 --- a/flashrom.c +++ b/flashrom.c @@ -82,7 +82,6 @@ int read_memmapped(struct flashchip *flash, uint8_t *buf) struct flashchip *probe_flash(struct flashchip *first_flash, int force) { - volatile uint8_t *bios; struct flashchip *flash; unsigned long base = 0, size; @@ -114,7 +113,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force) } base = flashbase ? flashbase : (0xffffffff - size + 1); - flash->virtual_memory = bios = physmap("flash chip", base, size); + flash->virtual_memory = physmap("flash chip", base, size); if (force) break; @@ -127,7 +126,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force) break; notfound: - physunmap((void *)bios, size); + physunmap((void *)flash->virtual_memory, size); } if (!flash || !flash->name) -- cgit v1.2.3