diff options
author | Frank Li <Frank.Li@nxp.com> | 2024-01-23 12:28:41 -0500 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-01-30 22:11:13 +0530 |
commit | a22fe1d6dec7e98535b97249fdc95c2be79120bb (patch) | |
tree | 271cb33b871c381ecaec84e4eecfbf1bccdec948 /include | |
parent | 0650006a93a2ce3b57f86e7f000347d9ae7737ef (diff) |
dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV
is_slave_direction() should return true when direction is DMA_DEV_TO_DEV.
Fixes: 49920bc66984 ("dmaengine: add new enum dma_transfer_direction")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240123172842.3764529-1-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dmaengine.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 3df70d6131c8..752dbde4cec1 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -953,7 +953,8 @@ static inline int dmaengine_slave_config(struct dma_chan *chan, static inline bool is_slave_direction(enum dma_transfer_direction direction) { - return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM); + return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM) || + (direction == DMA_DEV_TO_DEV); } static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single( |