diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-09-09 23:10:24 +1000 |
---|---|---|
committer | Thomas Heijligen <src@posteo.de> | 2023-02-27 10:27:55 +0000 |
commit | fc533e25623af76d0e6ff87681a7c3122df1607e (patch) | |
tree | 2ca2e0e5357a75691722a23bc0ef48c027735138 /ft2232_spi.c | |
parent | 648dc4a6535a699ebd7abd9d84cced64ff56d90d (diff) | |
download | flashrom-fc533e25623af76d0e6ff87681a7c3122df1607e.tar.gz flashrom-fc533e25623af76d0e6ff87681a7c3122df1607e.tar.bz2 flashrom-fc533e25623af76d0e6ff87681a7c3122df1607e.zip |
spi: Make 'default_spi_send_command' the default unless defined
A NULL func pointer is necessary and sufficient for the
condition `NULL func pointer => default_spi_send_command' as to not
need this explicit specification of 'default'.
Therefore drop the explicit need to specify the 'default_spi_send_command'
callback function pointer in the spi_master struct. This is a reasonable default for every other driver in the tree with only a few exceptions.
This simplifies the code and driver development.
Change-Id: I63abcb8c64f233cdbf58a149a31051fa648305a2
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67480
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'ft2232_spi.c')
-rw-r--r-- | ft2232_spi.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/ft2232_spi.c b/ft2232_spi.c index dfec1a0a5..16bcfe310 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -295,7 +295,6 @@ static const struct spi_master spi_master_ft2232 = { .features = SPI_MASTER_4BA, .max_data_read = 64 * 1024, .max_data_write = 256, - .command = default_spi_send_command, .multicommand = ft2232_spi_send_multicommand, .read = default_spi_read, .write_256 = default_spi_write_256, |