Attention is currently required from: Thomas Heijligen, Angel Pons, Anastasia Klimchuk. Hello build bot (Jenkins), Nico Huber, Miklós Márton, Thomas Heijligen, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/56103
to look at the new patch set (#7).
Change subject: spi_master: Use new API to register shutdown function ......................................................................
spi_master: Use new API to register shutdown function
This allows spi masters to register shutdown function in spi_master struct, which means there is no need to call register_shutdown in init function, since this call is now a part of register_spi_master.
As a consequence of using new API, two things are happening here: 1) No resource leakage anymore in case register_shutdown() would fail, 2) Fixed propagation of register_spi_master() return values.
Basic testing: when I comment out free(data) in linux_spi_shutdown, test fails with error ../linux_spi.c:235: note: block 0x55a4db276510 allocated here ERROR: linux_spi_init_and_shutdown_test_success leaked 1 block(s) Means, shutdown function is invoked.
BUG=b:185191942 TEST= 1) builds and ninja test including CB:56911 2) On ARMv7 device flashrom -p linux_spi -V -> using linux_spi, chip found 3) On x86_64 AMD device flashrom -p internal -V -> this is actually using sb600spi, chip found
Change-Id: Ib60300f9ddb295a255d5ef3f8da0e07064207140 Signed-off-by: Anastasia Klimchuk aklm@chromium.org --- M bitbang_spi.c M buspirate_spi.c M ch341a_spi.c M dediprog.c M digilent_spi.c M ene_lpc.c M ft2232_spi.c M it85spi.c M it87spi.c M jlink_spi.c M linux_spi.c M lspcon_i2c_spi.c M mec1308.c M mstarddc_spi.c M ni845x_spi.c M pickit2_spi.c M realtek_mst_i2c_spi.c M sb600spi.c M stlinkv3_spi.c M usbblaster_spi.c M wbsio_spi.c 21 files changed, 40 insertions(+), 112 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/03/56103/7