From 119d0e5236df69702c5ac5be593c4aa683e2b35d Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 9 Sep 2022 23:14:06 +1000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/67481 Tested-by: build bot (Jenkins) Reviewed-by: Thomas Heijligen --- sb600spi.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'sb600spi.c') diff --git a/sb600spi.c b/sb600spi.c index 5b9ac45c4..2e6c2eca7 100644 --- a/sb600spi.c +++ b/sb600spi.c @@ -599,7 +599,6 @@ static const struct spi_master spi_master_sb600 = { .max_data_read = FIFO_SIZE_OLD, .max_data_write = FIFO_SIZE_OLD - 3, .command = sb600_spi_send_command, - .multicommand = default_spi_send_multicommand, .map_flash_region = physmap, .unmap_flash_region = physunmap, .read = default_spi_read, @@ -612,7 +611,6 @@ static const struct spi_master spi_master_yangtze = { .max_data_read = FIFO_SIZE_YANGTZE - 3, /* Apparently the big SPI 100 buffer is not a ring buffer. */ .max_data_write = FIFO_SIZE_YANGTZE - 3, .command = spi100_spi_send_command, - .multicommand = default_spi_send_multicommand, .map_flash_region = physmap, .unmap_flash_region = physunmap, .read = default_spi_read, @@ -625,7 +623,6 @@ static const struct spi_master spi_master_promontory = { .max_data_read = MAX_DATA_READ_UNLIMITED, .max_data_write = FIFO_SIZE_YANGTZE - 3, .command = spi100_spi_send_command, - .multicommand = default_spi_send_multicommand, .map_flash_region = physmap, .unmap_flash_region = physunmap, .read = promontory_read_memmapped, -- cgit v1.2.3