diff options
author | Vinod Koul <vkoul@kernel.org> | 2018-10-05 03:02:12 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-10-07 15:55:10 +0200 |
commit | ad7756e7775e1af42ec0032ea0bea968b8f343a7 (patch) | |
tree | 0c0f3bdbb64009d70c3ab2324d08c91ea3e0a00d /drivers/dma/k3dma.c | |
parent | dmaengine: imx-dma: remove dma_slave_config direction usage (diff) | |
download | linux-ad7756e7775e1af42ec0032ea0bea968b8f343a7.tar.xz linux-ad7756e7775e1af42ec0032ea0bea968b8f343a7.zip |
dmaengine: k3dma: dont use direction for memcpy
Memcpy has no direction (copy from memory to memory) so remove the check
in prep_memcpy()
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/k3dma.c')
-rw-r--r-- | drivers/dma/k3dma.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 6bfa217ed6d0..964dcb46755b 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -501,14 +501,8 @@ static struct dma_async_tx_descriptor *k3_dma_prep_memcpy( copy = min_t(size_t, len, DMA_MAX_SIZE); k3_dma_fill_desc(ds, dst, src, copy, num++, c->ccfg); - if (c->dir == DMA_MEM_TO_DEV) { - src += copy; - } else if (c->dir == DMA_DEV_TO_MEM) { - dst += copy; - } else { - src += copy; - dst += copy; - } + src += copy; + dst += copy; len -= copy; } while (len); |