spi: sh-msiof: Fix transmit-only DMA transfers
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 7 Aug 2014 12:07:43 +0000 (14:07 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 31 Aug 2014 12:41:46 +0000 (13:41 +0100)
Fix tx/rx mixup, which broke transmit-only transfers.

Introduced by commit 4240305f7cbdc7782aa8bc40cc702775d9ac0839
("spi: sh-msiof: Fix leaking of unused DMA descriptors").

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-sh-msiof.c

index 887c2084130f520a3f2814c8c46fb37e2aaa5a16..543075b80f166db0a6ec810ab931889d1019a9e4 100644 (file)
@@ -693,9 +693,9 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
        reinit_completion(&p->done);
 
        /* Now start DMA */
-       if (tx)
-               dma_async_issue_pending(p->master->dma_rx);
        if (rx)
+               dma_async_issue_pending(p->master->dma_rx);
+       if (tx)
                dma_async_issue_pending(p->master->dma_tx);
 
        ret = sh_msiof_spi_start(p, rx);