@@ -974,13 +974,15 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
goto out;
}
- if (!dspi->irq) {
- do {
- status = dspi_poll(dspi);
- } while (status == -EINPROGRESS);
- } else if (trans_mode != DSPI_DMA_MODE) {
- wait_for_completion(&dspi->xfer_done);
- reinit_completion(&dspi->xfer_done);
+ if (trans_mode != DSPI_DMA_MODE) {
+ if (dspi->irq) {
+ wait_for_completion(&dspi->xfer_done);
+ reinit_completion(&dspi->xfer_done);
+ } else {
+ do {
+ status = dspi_poll(dspi);
+ } while (status == -EINPROGRESS);
+ }
}
spi_transfer_delay_exec(transfer);