From: Geert Uytterhoeven Date: Thu, 7 Aug 2014 12:07:43 +0000 (+0200) Subject: spi: sh-msiof: Fix transmit-only DMA transfers X-Git-Tag: firefly_0821_release~176^2~3136^2~1^5~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7a9f957b395fc08edc47620c01e8bb5b798caddb;p=firefly-linux-kernel-4.4.55.git spi: sh-msiof: Fix transmit-only DMA transfers 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 Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index daaa868e959f..1165d418340f 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -689,9 +689,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);