diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-05-17 22:40:22 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-27 01:33:24 +0100 |
commit | b90cc232e2ce8c959b19dc4b183e23e7aec137ab (patch) | |
tree | 3efcdcf8229970d2f459ec09311420d38d246426 /include/linux/spi | |
parent | c3358a746e078d0f9048732c90fdab4f37c00e0d (diff) |
spi: bitbang: Replace hard coded number of SPI modes
Instead of using hard coded number of modes, replace it with
SPI_MODE_X_MASK + 1 to show relation to the SPI modes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://msgid.link/r/20240517194104.747328-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi_bitbang.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 7ca08b430ed5..d4cb83195f7a 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -30,7 +30,7 @@ struct spi_bitbang { int (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t); /* txrx_word[SPI_MODE_*]() just looks like a shift register */ - spi_bb_txrx_word_fn txrx_word[4]; + spi_bb_txrx_word_fn txrx_word[SPI_MODE_X_MASK + 1]; int (*set_line_direction)(struct spi_device *spi, bool output); }; |