Message ID | 1409209620-24487-277-git-send-email-horms+renesas@verge.net.au (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index d04a4ac..57beda2 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -726,13 +726,13 @@ static int rspi_transfer_out_in(struct rspi_data *rspi, u8 *rx_buf = xfer->rx_buf; u8 spcr, data; - rspi_receive_init(rspi); - spcr = rspi_read8(rspi, RSPI_SPCR); - if (rx_buf) + if (rx_buf) { + rspi_receive_init(rspi); spcr &= ~SPCR_TXMD; - else + } else { spcr |= SPCR_TXMD; + } rspi_write8(rspi, spcr, RSPI_SPCR); while (remain > 0) {