DMA Engine development
 help / color / mirror / Atom feed
* [05/12] dmaengine: dw: remove dma_slave_config direction usage
@ 2018-09-11  8:35 Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-09-11  8:35 UTC (permalink / raw)
  To: dmaengine; +Cc: Vinod Koul, Viresh Kumar, Andy Shevchenko

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

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
CC: Viresh Kumar <vireshk@kernel.org>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

 drivers/dma/dw/core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index f43e6dafe446..d0c3e50b39fb 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [05/12] dmaengine: dw: remove dma_slave_config direction usage
@ 2018-09-21 17:03 Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-09-21 17:03 UTC (permalink / raw)
  To: Vinod Koul; +Cc: dmaengine, Viresh Kumar

On Tue, Sep 11, 2018 at 02:05:29PM +0530, Vinod Koul wrote:
> 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().

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
> CC: Viresh Kumar <vireshk@kernel.org>
> CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
>  drivers/dma/dw/core.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
> index f43e6dafe446..d0c3e50b39fb 100644
> --- a/drivers/dma/dw/core.c
> +++ b/drivers/dma/dw/core.c
> @@ -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;
> -- 
> 2.14.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-21 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11  8:35 [05/12] dmaengine: dw: remove dma_slave_config direction usage Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2018-09-21 17:03 Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox