[flashrom] [commit] r1240 - trunk

repository service svn at flashrom.org
Thu Dec 2 22:59:42 CET 2010


Author: hailfinger
Date: Thu Dec  2 22:59:42 2010
New Revision: 1240
URL: http://flashrom.org/trac/flashrom/changeset/1240

Log:
Avoid printing the chip locks if chip detection was forced because lock
access may involve flash chip registers which will not be mapped.

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

Modified:
   trunk/flashrom.c

Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c	Thu Dec  2 22:57:42 2010	(r1239)
+++ trunk/flashrom.c	Thu Dec  2 22:59:42 2010	(r1240)
@@ -1163,8 +1163,12 @@
 	       flash->vendor, flash->name, flash->total_size,
 	       flashbuses_to_text(flash->bustype), base);
 
-	if (flash->printlock)
-		flash->printlock(flash);
+	/* Flash registers will not be mapped if the chip was forced. Lock info
+	 * may be stored in registers, so avoid lock info printing.
+	 */
+	if (!force)
+		if (flash->printlock)
+			flash->printlock(flash);
 
 	return flash;
 }




More information about the flashrom mailing list