diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-12-20 12:33:13 +1100 |
---|---|---|
committer | Thomas Heijligen <src@posteo.de> | 2023-03-03 17:35:50 +0000 |
commit | e1f30bbce7a603d518ecec9d7e6885719f396719 (patch) | |
tree | 8eb630273f026b859d29a9b7854d447cb43c122f /ch347_spi.c | |
parent | c66d2bd1ca384dd673b24420e11865fde86060fc (diff) | |
download | flashrom-e1f30bbce7a603d518ecec9d7e6885719f396719.tar.gz flashrom-e1f30bbce7a603d518ecec9d7e6885719f396719.tar.bz2 flashrom-e1f30bbce7a603d518ecec9d7e6885719f396719.zip |
tree/: Drop default_spi_probe_opcode for NULL case
A NULL func pointer is necessary and sufficient for the
condition `NULL func pointer => true' as to not need this
boilerplate as it implies default behaviour of a supported
opcode within the `check_block_eraser()` match supported loop.
Ran;
```
$ find . -name '*.[c,h]' -exec sed -i '/.probe_opcode = default_spi_probe_opcode,/d' '{}' \;
```
Change-Id: Id502c5d2596ad1db52faf05723083620e4c52c12
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70264
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'ch347_spi.c')
-rw-r--r-- | ch347_spi.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/ch347_spi.c b/ch347_spi.c index e828f008..570e25be 100644 --- a/ch347_spi.c +++ b/ch347_spi.c @@ -257,7 +257,6 @@ static const struct spi_master spi_master_ch347_spi = { .write_256 = default_spi_write_256, .write_aai = default_spi_write_aai, .shutdown = ch347_spi_shutdown, - .probe_opcode = default_spi_probe_opcode, }; /* Largely copied from ch341a_spi.c */ |