Edward O'Callaghan has uploaded this change for review.
dummyflasher.c: Fix buses_supported branching
Fix get_data_from_context() s.t. we return back
the correct handle based on the respective bus bit
field
BUG=none
BRANCH=none
TEST=none
Change-Id: I252aa318bca17ea2aaa963365624568c50765d2a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M dummyflasher.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/18/54018/1
diff --git a/dummyflasher.c b/dummyflasher.c
index ec5060d..4e8f094 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -175,10 +175,12 @@
static struct emu_data* get_data_from_context(const struct flashctx *flash)
{
- if (dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH))
+ if (dummy_buses_supported & BUS_NONSPI)
return (struct emu_data *)flash->mst->par.data;
else if (dummy_buses_supported & BUS_SPI)
return (struct emu_data *)flash->mst->spi.data;
+ else if (dummy_buses_supported & BUS_PROG)
+ return (struct emu_data *)flash->mst->opaque.data;
return NULL; /* buses was set to BUS_NONE. */
}
To view, visit change 54018. To unsubscribe, or for help writing mail filters, visit settings.