summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-09 07:32:30 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-09 07:32:30 +0000
commit8b4f8e04537b5c81c7fee45512fc594cb71525c7 (patch)
treec6caf8e0ee0191ecf6f30632d5fb126235b06bdb
parent97d6b09209b171978d76dad835c7d33267e470ca (diff)
downloadast2050-flashrom-8b4f8e04537b5c81c7fee45512fc594cb71525c7.zip
ast2050-flashrom-8b4f8e04537b5c81c7fee45512fc594cb71525c7.tar.gz
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>
-rw-r--r--flashrom.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/flashrom.c b/flashrom.c
index 3086cbe..d7f4479 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)
OpenPOWER on IntegriCloud