Anastasia Klimchuk has uploaded this change for review.
programmer: Make use of new register_par_master() API
Pass pointers to dynamically allocated data to register_par_master().
This way we can avoid some mutable globals.
BUG=b:185191942
TEST=builds
Change-Id: I76572e43d01f8a5e1aa73b1b9e8a187465ed8fef
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M dummyflasher.c
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/72/54172/1
diff --git a/dummyflasher.c b/dummyflasher.c
index 1455d30..c9c68d0 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -622,7 +622,7 @@
.write_aai = default_spi_write_aai,
};
-static struct par_master par_master_dummy = {
+static const struct par_master par_master_dummy = {
.chip_readb = dummy_chip_readb,
.chip_readw = dummy_chip_readw,
.chip_readl = dummy_chip_readl,
@@ -675,7 +675,6 @@
data->emu_chip = EMULATE_NONE;
data->delay_us = 0;
spi_master_dummyflasher.data = data;
- par_master_dummy.data = data;
msg_pspew("%s\n", __func__);
@@ -1029,7 +1028,7 @@
if (dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH))
register_par_master(&par_master_dummy,
dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH),
- NULL);
+ data);
if (dummy_buses_supported & BUS_SPI)
register_spi_master(&spi_master_dummyflasher);
To view, visit change 54172. To unsubscribe, or for help writing mail filters, visit settings.