[coreboot] [flashrom] r489 - trunk

svn at coreboot.org svn at coreboot.org
Sat May 9 09:32:31 CEST 2009


Author: hailfinger
Date: 2009-05-09 09:32:30 +0200 (Sat, 09 May 2009)
New Revision: 489

Modified:
   trunk/flashrom.c
Log:
Kill one superfluous variable and improve code readability.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>


Modified: trunk/flashrom.c
===================================================================
--- trunk/flashrom.c	2009-05-09 07:27:23 UTC (rev 488)
+++ trunk/flashrom.c	2009-05-09 07:32:30 UTC (rev 489)
@@ -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)





More information about the coreboot mailing list