dmaengine: k3dma: dont use direction for memcpy
authorVinod Koul <vkoul@kernel.org>
Fri, 5 Oct 2018 01:02:12 +0000 (06:32 +0530)
committerVinod Koul <vkoul@kernel.org>
Sun, 7 Oct 2018 13:55:10 +0000 (19:25 +0530)
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>
drivers/dma/k3dma.c

index 6bfa217ed6d0de81d1ef51b37accdba9ae4cd04b..964dcb46755b54d00fc09bdb33ab6fdf0363bc59 100644 (file)
@@ -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);