summaryrefslogtreecommitdiff
path: root/drivers/dma/ti
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2020-08-24 15:01:20 +0300
committerVinod Koul <vkoul@kernel.org>2020-08-25 15:54:21 +0530
commit8f757317b8645f2f602f4fcefd5b1f31f774e63b (patch)
tree5dfcb2b82514cbc8beff686bd6c64cbc33d94dfc /drivers/dma/ti
parent144ceb27d737b853113ea4aa7d7c9b3dfe98be0b (diff)
dmaengine: ti: k3-udma: Remove redundant is_slave_direction() checks
The direction has been already validated in the main callback and there is no need to check it again in the TR mode handlers for slave_sg and cyclic. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200824120120.9270-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/ti')
-rw-r--r--drivers/dma/ti/k3-udma.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index c14e6cb105cd..b861e4f9d803 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -2024,11 +2024,6 @@ udma_prep_slave_sg_tr(struct udma_chan *uc, struct scatterlist *sgl,
int num_tr = 0;
int tr_idx = 0;
- if (!is_slave_direction(dir)) {
- dev_err(uc->ud->dev, "Only slave cyclic is supported\n");
- return NULL;
- }
-
/* estimate the number of TRs we will need */
for_each_sg(sgl, sgent, sglen, i) {
if (sg_dma_len(sgent) < SZ_64K)
@@ -2400,11 +2395,6 @@ udma_prep_dma_cyclic_tr(struct udma_chan *uc, dma_addr_t buf_addr,
unsigned int i;
int num_tr;
- if (!is_slave_direction(dir)) {
- dev_err(uc->ud->dev, "Only slave cyclic is supported\n");
- return NULL;
- }
-
num_tr = udma_get_tr_counters(period_len, __ffs(buf_addr), &tr0_cnt0,
&tr0_cnt1, &tr1_cnt0);
if (num_tr < 0) {