aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi_bitbang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 14a63f6010d1..bb38c83ba210 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -68,7 +68,7 @@ static unsigned bitbang_txrx_8(
68 unsigned ns, 68 unsigned ns,
69 struct spi_transfer *t 69 struct spi_transfer *t
70) { 70) {
71 unsigned bits = spi->bits_per_word; 71 unsigned bits = t->bits_per_word ? : spi->bits_per_word;
72 unsigned count = t->len; 72 unsigned count = t->len;
73 const u8 *tx = t->tx_buf; 73 const u8 *tx = t->tx_buf;
74 u8 *rx = t->rx_buf; 74 u8 *rx = t->rx_buf;
@@ -94,7 +94,7 @@ static unsigned bitbang_txrx_16(
94 unsigned ns, 94 unsigned ns,
95 struct spi_transfer *t 95 struct spi_transfer *t
96) { 96) {
97 unsigned bits = spi->bits_per_word; 97 unsigned bits = t->bits_per_word ? : spi->bits_per_word;
98 unsigned count = t->len; 98 unsigned count = t->len;
99 const u16 *tx = t->tx_buf; 99 const u16 *tx = t->tx_buf;
100 u16 *rx = t->rx_buf; 100 u16 *rx = t->rx_buf;
@@ -120,7 +120,7 @@ static unsigned bitbang_txrx_32(
120 unsigned ns, 120 unsigned ns,
121 struct spi_transfer *t 121 struct spi_transfer *t
122) { 122) {
123 unsigned bits = spi->bits_per_word; 123 unsigned bits = t->bits_per_word ? : spi->bits_per_word;
124 unsigned count = t->len; 124 unsigned count = t->len;
125 const u32 *tx = t->tx_buf; 125 const u32 *tx = t->tx_buf;
126 u32 *rx = t->rx_buf; 126 u32 *rx = t->rx_buf;