Kill one superfluous variable and improve code readability
Corresponding to flashrom svn r489.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/flashrom.c b/flashrom.c
index 3086cbe..d7f4479 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -82,7 +82,6 @@
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 @@
}
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 @@
break;
notfound:
- physunmap((void *)bios, size);
+ physunmap((void *)flash->virtual_memory, size);
}
if (!flash || !flash->name)