Skip to contentSkip to conversation

dmaengine: dw: remove dma_slave_config direction usage

PATCH New Andy Shevchenko 1 participant 1 message Sep 21, 2018 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 5/12 dmaengine: dw: remove dma_slave_config direction usage

Quoted 3 lines · Vinod Koul

dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed

It looks like we assign direction field in custom struct any time when we call one of ->*prep*() functions, so, it's safe to be removed from ->config().

Quoted 29 lines

---
CC: Viresh Kumar <[email protected]>
CC: Andy Shevchenko <[email protected]>

 drivers/dma/dw/core.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/dma/dw/core.c +0 -5
index f43e6dafe446..d0c3e50b39fb 100644
@@ -886,12 +886,7 @@ static int dwc_config(struct dma_chan *chan, struct dma_slave_config *sconfig)
 	 */
 	u32 s = dw->pdata->is_idma32 ? 1 : 2;
 
-	/* Check if chan will be configured for slave transfers */
-	if (!is_slave_direction(sconfig->direction))
-		return -EINVAL;
-
 	memcpy(&dwc->dma_sconfig, sconfig, sizeof(*sconfig));
-	dwc->direction = sconfig->direction;
 
 	sc->src_maxburst = sc->src_maxburst > 1 ? fls(sc->src_maxburst) - s : 0;
 	sc->dst_maxburst = sc->dst_maxburst > 1 ? fls(sc->dst_maxburst) - s : 0;
Signature · 1 line
2.14.4