summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-12-02 21:59:42 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-12-02 21:59:42 +0000
commit859f3f0d751e92ec99c79408a4a7789bfb61a514 (patch)
tree7deb9003389538eee23ff2d086d3a19eceeb7c32 /flashrom.c
parent742999c68206ae51724f7ee630a9d0572ce72c38 (diff)
downloadast2050-flashrom-859f3f0d751e92ec99c79408a4a7789bfb61a514.zip
ast2050-flashrom-859f3f0d751e92ec99c79408a4a7789bfb61a514.tar.gz
Avoid printing the chip locks if chip detection was forced
Lock access may involve flash chip registers which will not be mapped if automatic detection failed. Corresponding to flashrom svn r1240. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/flashrom.c b/flashrom.c
index 629cce2..55d4d7b 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1163,8 +1163,12 @@ notfound:
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;
}
OpenPOWER on IntegriCloud