Message ID | 1590378062-7965-9-git-send-email-dillon.minfei@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable ili9341 and l3gd20 on stm32f429-disco | expand |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c92c894..f884411 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1023,7 +1023,8 @@ static int spi_map_msg(struct spi_controller *ctlr, struct spi_message *msg) void *tmp; unsigned int max_tx, max_rx; - if (ctlr->flags & (SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX)) { + if ((ctlr->flags & (SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX)) + && !(msg->spi->mode & SPI_3WIRE)) { max_tx = 0; max_rx = 0;