diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-09-09 23:14:06 +1000 |
---|---|---|
committer | Thomas Heijligen <src@posteo.de> | 2023-03-01 09:43:17 +0000 |
commit | 119d0e5236df69702c5ac5be593c4aa683e2b35d (patch) | |
tree | 98ee5bafbbdc4bb8346594ba2f49f76de31830c6 /mediatek_i2c_spi.c | |
parent | 263d50c7d1f149c5d0f14512a1f6251b2a4e878f (diff) | |
download | flashrom-git-119d0e5236df69702c5ac5be593c4aa683e2b35d.tar.gz |
spi: Make 'default_spi_send_multicommand' the default unless defined
A NULL func pointer is necessary and sufficient for the
condition `NULL func pointer => default_spi_send_multicommand' as to not
need this explicit specification of 'default'.
Therefore drop the explicit need to specify the
'default_spi_send_multicommand' 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: I6cc24bf982da3d5251d391eb397db43dd10280e8
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67481
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'mediatek_i2c_spi.c')
-rw-r--r-- | mediatek_i2c_spi.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/mediatek_i2c_spi.c b/mediatek_i2c_spi.c index c15df056..e9c3c8c8 100644 --- a/mediatek_i2c_spi.c +++ b/mediatek_i2c_spi.c @@ -456,7 +456,6 @@ static const struct spi_master spi_master_i2c_mediatek = { // Leave room for 1-byte command and up to a 4-byte address. .max_data_write = I2C_SMBUS_BLOCK_MAX - 5, .command = mediatek_send_command, - .multicommand = default_spi_send_multicommand, .read = default_spi_read, .write_256 = default_spi_write_256, .shutdown = mediatek_shutdown, |