From 0a7f036610673f6664c9d1492912abfdfbdf9f20 Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Tue, 6 Jul 2021 16:03:11 +1000 Subject: spi_master: Move shutdown function above spi_master struct This patch prepares spi masters to use new API which allows to register shutdown function in spi_master struct. See also later patch in this chain, where spi masters are converted to new API. BUG=b:185191942 TEST=builds and ninja test Comparing flashrom binary before and after the patch, make clean && make CONFIG_EVERYTHING=yes VERSION=none binary is the same Change-Id: I50716686552b4ddcc6089d5afadb19ef59d9f9b4 Signed-off-by: Anastasia Klimchuk Reviewed-on: https://review.coreboot.org/c/flashrom/+/56101 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Nico Huber --- bitbang_spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bitbang_spi.c') diff --git a/bitbang_spi.c b/bitbang_spi.c index 3d973c58..83c3501b 100644 --- a/bitbang_spi.c +++ b/bitbang_spi.c @@ -131,6 +131,13 @@ static int bitbang_spi_send_command(const struct flashctx *flash, return 0; } +static int bitbang_spi_shutdown(void *data) +{ + /* FIXME: Run bitbang_spi_release_bus here or per command? */ + free(data); + return 0; +} + static const struct spi_master spi_master_bitbang = { .features = SPI_MASTER_4BA, .max_data_read = MAX_DATA_READ_UNLIMITED, @@ -142,13 +149,6 @@ static const struct spi_master spi_master_bitbang = { .write_aai = default_spi_write_aai, }; -static int bitbang_spi_shutdown(void *data) -{ - /* FIXME: Run bitbang_spi_release_bus here or per command? */ - free(data); - return 0; -} - int register_spi_bitbang_master(const struct bitbang_spi_master *master, void *spi_data) { struct spi_master mst = spi_master_bitbang; -- cgit v1.2.3