summaryrefslogtreecommitdiffstats
path: root/stm50flw0x0x.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-09-16 08:18:08 +0000
committerStefan Reinauer <stepan@coresystems.de>2009-09-16 08:18:08 +0000
commita369bdbb30de1f0fbbfb79570829f0d85652ccca (patch)
tree375d71717241476bec265568958024db7eee3e37 /stm50flw0x0x.c
parent95450044f9adeebbed2d0f59a3c7828a37b61f56 (diff)
downloadflashrom-a369bdbb30de1f0fbbfb79570829f0d85652ccca.zip
flashrom-a369bdbb30de1f0fbbfb79570829f0d85652ccca.tar.gz
This patch fixes all 27 flashrom source code issues reported by LLVM/clang's scan-build (r79326, new build on the way)
This commit fixes only some of the issues, those that were Corresponding to flashrom svn r722. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'stm50flw0x0x.c')
-rw-r--r--stm50flw0x0x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/stm50flw0x0x.c b/stm50flw0x0x.c
index 8cbafe2..44819e5 100644
--- a/stm50flw0x0x.c
+++ b/stm50flw0x0x.c
@@ -54,19 +54,17 @@ int probe_stm50flw0x0x(struct flashchip *flash)
static void wait_stm50flw0x0x(chipaddr bios)
{
- uint8_t id1;
- // id2;
-
chip_writeb(0x70, bios);
if ((chip_readb(bios) & 0x80) == 0) { // it's busy
while ((chip_readb(bios) & 0x80) == 0) ;
}
+
// put another command to get out of status register mode
chip_writeb(0x90, bios);
programmer_delay(10);
- id1 = chip_readb(bios);
+ chip_readb(bios); // Read device ID (to make sure?)
// this is needed to jam it out of "read id" mode
chip_writeb(0xAA, bios + 0x5555);
OpenPOWER on IntegriCloud