Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk. Hello build bot (Jenkins), Nico Huber, Thomas Heijligen, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/55932
to look at the new patch set (#2).
Change subject: [RFC] spi_master: Add shutdown function in spi_master struct ......................................................................
[RFC] spi_master: Add shutdown function in spi_master struct
With this, register_spi_master can take care of register_shutdown as well, and every spi master only needs to call register_spi_master instead of calling both register_spi_master and register_shutdown.
This is alternative approach to CB:51761 which does not require adding another argument to register_spi_master.
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.
Same for dummy: comment out free(data) in shutdown. It is also caught in test ../dummyflasher.c:949: note: block 0x55e0727a6e40 allocated here ERROR: dummy_init_and_shutdown_test_success leaked 1 block(s) Means, shutdown function is invoked even for drivers with "old" API (so, transition from old to new is not breaking anything).
Change-Id: I2dc80dceca2f8204bcd0dad1f51753d7e79f1af5 Signed-off-by: Anastasia Klimchuk aklm@chromium.org --- M linux_spi.c M programmer.h M spi.c 3 files changed, 9 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/32/55932/2