aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_bitbang.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi_bitbang.c')
-rw-r--r--drivers/spi/spi_bitbang.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 85e61f451218..855b0b06e625 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -201,9 +201,6 @@ int spi_bitbang_setup(struct spi_device *spi)
201 spi->controller_state = cs; 201 spi->controller_state = cs;
202 } 202 }
203 203
204 if (!spi->bits_per_word)
205 spi->bits_per_word = 8;
206
207 /* per-word shift register access, in hardware or bitbanging */ 204 /* per-word shift register access, in hardware or bitbanging */
208 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)]; 205 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)];
209 if (!cs->txrx_word) 206 if (!cs->txrx_word)
@@ -213,9 +210,7 @@ int spi_bitbang_setup(struct spi_device *spi)
213 if (retval < 0) 210 if (retval < 0)
214 return retval; 211 return retval;
215 212
216 dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n", 213 dev_dbg(&spi->dev, "%s, %u nsec/bit\n", __func__, 2 * cs->nsecs);
217 __func__, spi->mode & (SPI_CPOL | SPI_CPHA),
218 spi->bits_per_word, 2 * cs->nsecs);
219 214
220 /* NOTE we _need_ to call chipselect() early, ideally with adapter 215 /* NOTE we _need_ to call chipselect() early, ideally with adapter
221 * setup, unless the hardware defaults cooperate to avoid confusion 216 * setup, unless the hardware defaults cooperate to avoid confusion