summaryrefslogtreecommitdiffstats
path: root/wbsio_spi.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-07-06 16:03:11 +1000
committerNico Huber <nico.h@gmx.de>2021-08-17 09:39:18 +0000
commit0a7f036610673f6664c9d1492912abfdfbdf9f20 (patch)
treeca67f6d90b777debae831039267adfcab01c18d9 /wbsio_spi.c
parent5a97be363a269b364569be8223369d9a5bf92292 (diff)
downloadflashrom-0a7f036610673f6664c9d1492912abfdfbdf9f20.tar.gz
flashrom-0a7f036610673f6664c9d1492912abfdfbdf9f20.tar.bz2
flashrom-0a7f036610673f6664c9d1492912abfdfbdf9f20.zip
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 <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/56101 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'wbsio_spi.c')
-rw-r--r--wbsio_spi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wbsio_spi.c b/wbsio_spi.c
index c3814aab6..233684560 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -177,6 +177,12 @@ static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf,
return 0;
}
+static int wbsio_spi_shutdown(void *data)
+{
+ free(data);
+ return 0;
+}
+
static const struct spi_master spi_master_wbsio = {
.max_data_read = MAX_DATA_UNSPECIFIED,
.max_data_write = MAX_DATA_UNSPECIFIED,
@@ -187,12 +193,6 @@ static const struct spi_master spi_master_wbsio = {
.write_aai = spi_chip_write_1,
};
-static int wbsio_spi_shutdown(void *data)
-{
- free(data);
- return 0;
-}
-
int wbsio_check_for_spi(void)
{
uint16_t wbsio_spibase = 0;