Commit 8b4f8e04 authored by Carl-Daniel Hailfinger's avatar Carl-Daniel Hailfinger
Browse files

Kill one superfluous variable and improve code readability


Corresponding to flashrom svn r489.
Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
parent 97d6b092
...@@ -82,7 +82,6 @@ int read_memmapped(struct flashchip *flash, uint8_t *buf) ...@@ -82,7 +82,6 @@ int read_memmapped(struct flashchip *flash, uint8_t *buf)
struct flashchip *probe_flash(struct flashchip *first_flash, int force) struct flashchip *probe_flash(struct flashchip *first_flash, int force)
{ {
volatile uint8_t *bios;
struct flashchip *flash; struct flashchip *flash;
unsigned long base = 0, size; unsigned long base = 0, size;
...@@ -114,7 +113,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force) ...@@ -114,7 +113,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
} }
base = flashbase ? flashbase : (0xffffffff - size + 1); 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) if (force)
break; break;
...@@ -127,7 +126,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force) ...@@ -127,7 +126,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
break; break;
notfound: notfound:
physunmap((void *)bios, size); physunmap((void *)flash->virtual_memory, size);
} }
if (!flash || !flash->name) if (!flash || !flash->name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment