From 972c1550b4d67abdfe187100905f95030e18a796 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 9 Sep 2022 23:01:05 +1000 Subject: spi: Make 'default_spi_write_aai' the default unless defined A NULL func pointer is necessary and sufficient for the condition `NULL func pointer => default_spi_write_aai' as to not need this explicit specification of 'default'. Therefore Drop the explicit need to specify the 'default_spi_write_aai' 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: I7f14aaea0edcf0c08cea0e9cd27d58152707fb2a Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/67479 Reviewed-by: Peter Marheine Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- ichspi.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'ichspi.c') diff --git a/ichspi.c b/ichspi.c index 7b23b423..1522d2b4 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1947,7 +1947,6 @@ static const struct spi_master spi_master_ich7 = { .unmap_flash_region = physunmap, .read = default_spi_read, .write_256 = default_spi_write_256, - .write_aai = default_spi_write_aai, }; static const struct spi_master spi_master_ich9 = { @@ -1959,7 +1958,6 @@ static const struct spi_master spi_master_ich9 = { .unmap_flash_region = physunmap, .read = default_spi_read, .write_256 = default_spi_write_256, - .write_aai = default_spi_write_aai, .probe_opcode = ich_spi_probe_opcode, }; @@ -2383,7 +2381,6 @@ static const struct spi_master spi_master_via = { .unmap_flash_region = physunmap, .read = default_spi_read, .write_256 = default_spi_write_256, - .write_aai = default_spi_write_aai, .probe_opcode = ich_spi_probe_opcode, }; -- cgit v1.2.3