1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

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 <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67479
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Edward O'Callaghan
2022-09-09 23:01:05 +10:00
committed by Felix Singer
parent 8b0250b32b
commit 972c1550b4
19 changed files with 4 additions and 24 deletions

View File

@ -604,7 +604,6 @@ static const struct spi_master spi_master_sb600 = {
.unmap_flash_region = physunmap,
.read = default_spi_read,
.write_256 = default_spi_write_256,
.write_aai = default_spi_write_aai,
.shutdown = sb600spi_shutdown,
.probe_opcode = default_spi_probe_opcode,
};
@ -618,7 +617,6 @@ static const struct spi_master spi_master_yangtze = {
.unmap_flash_region = physunmap,
.read = default_spi_read,
.write_256 = default_spi_write_256,
.write_aai = default_spi_write_aai,
.shutdown = sb600spi_shutdown,
.probe_opcode = default_spi_probe_opcode,
};
@ -632,7 +630,6 @@ static const struct spi_master spi_master_promontory = {
.unmap_flash_region = physunmap,
.read = promontory_read_memmapped,
.write_256 = default_spi_write_256,
.write_aai = default_spi_write_aai,
.shutdown = sb600spi_shutdown,
.probe_opcode = default_spi_probe_opcode,
};