aboutsummaryrefslogtreecommitdiffstats
path: root/ichspi.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-05-13 12:28:47 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2021-05-23 04:18:54 +0000
commit9309bed2906440cfac1257135805fd82c5d8b7a8 (patch)
tree161cbae0a42155f150d6bb31cda696ad6a52dd8c /ichspi.c
parent6a5db26e686d32165621a6839843639192a33102 (diff)
downloadflashrom-9309bed2906440cfac1257135805fd82c5d8b7a8.tar.gz
flashrom-9309bed2906440cfac1257135805fd82c5d8b7a8.tar.bz2
flashrom-9309bed2906440cfac1257135805fd82c5d8b7a8.zip
programmer: Smoothen register_opaque_master() API
It was impossible to register a const struct opaque_master that would point to dynamically allocated `data`. Fix that so that we won't have to create more mutable globals. BUG=b:185191942 TEST=builds Change-Id: Id3adb4cf04ae04dbe87ddb96f30871cb5f7c8ff0 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/54170 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'ichspi.c')
-rw-r--r--ichspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ichspi.c b/ichspi.c
index 57cbdeeb..80fcff5e 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -2046,7 +2046,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
}
hwseq_data.size_comp1 = tmpi;
- register_opaque_master(&opaque_master_ich_hwseq);
+ register_opaque_master(&opaque_master_ich_hwseq, NULL);
} else {
register_spi_master(&spi_master_ich9, NULL);
}