diff mbox

[v2] dma: fix build breakage in s3c24xx-dma

Message ID 20131203225442.17348.9110.stgit@viggo.jf.intel.com (mailing list archive)
State Accepted
Commit 85726def1e351bdd057cdc4bb349dcbdf6bdd251
Delegated to: Vinod Koul
Headers show

Commit Message

Dan Williams Dec. 3, 2013, 10:55 p.m. UTC
This driver missed the dma unmap conversion.  Replace
s3c24xx_dma_unmap_buffers with dma_descriptor_unmap.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
v2: Rebased since the DMA_COMPLETE portion of this patch is already in
    dma-slave/fixes

 drivers/dma/s3c24xx-dma.c |   31 +------------------------------
 1 files changed, 1 insertions(+), 30 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Vinod Koul Dec. 4, 2013, 5:54 a.m. UTC | #1
On Tue, Dec 03, 2013 at 02:55:50PM -0800, Dan Williams wrote:
> This driver missed the dma unmap conversion.  Replace
> s3c24xx_dma_unmap_buffers with dma_descriptor_unmap.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Applied, thanks

--
~Vinod
> ---
> v2: Rebased since the DMA_COMPLETE portion of this patch is already in
>     dma-slave/fixes
> 
>  drivers/dma/s3c24xx-dma.c |   31 +------------------------------
>  1 files changed, 1 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c
> index 085da4fe6613..4eddedb6eb7d 100644
> --- a/drivers/dma/s3c24xx-dma.c
> +++ b/drivers/dma/s3c24xx-dma.c
> @@ -628,42 +628,13 @@ retry:
>  	s3cchan->state = S3C24XX_DMA_CHAN_IDLE;
>  }
>  
> -static void s3c24xx_dma_unmap_buffers(struct s3c24xx_txd *txd)
> -{
> -	struct device *dev = txd->vd.tx.chan->device->dev;
> -	struct s3c24xx_sg *dsg;
> -
> -	if (!(txd->vd.tx.flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
> -		if (txd->vd.tx.flags & DMA_COMPL_SRC_UNMAP_SINGLE)
> -			list_for_each_entry(dsg, &txd->dsg_list, node)
> -				dma_unmap_single(dev, dsg->src_addr, dsg->len,
> -						DMA_TO_DEVICE);
> -		else {
> -			list_for_each_entry(dsg, &txd->dsg_list, node)
> -				dma_unmap_page(dev, dsg->src_addr, dsg->len,
> -						DMA_TO_DEVICE);
> -		}
> -	}
> -
> -	if (!(txd->vd.tx.flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
> -		if (txd->vd.tx.flags & DMA_COMPL_DEST_UNMAP_SINGLE)
> -			list_for_each_entry(dsg, &txd->dsg_list, node)
> -				dma_unmap_single(dev, dsg->dst_addr, dsg->len,
> -						DMA_FROM_DEVICE);
> -		else
> -			list_for_each_entry(dsg, &txd->dsg_list, node)
> -				dma_unmap_page(dev, dsg->dst_addr, dsg->len,
> -						DMA_FROM_DEVICE);
> -	}
> -}
> -
>  static void s3c24xx_dma_desc_free(struct virt_dma_desc *vd)
>  {
>  	struct s3c24xx_txd *txd = to_s3c24xx_txd(&vd->tx);
>  	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(vd->tx.chan);
>  
>  	if (!s3cchan->slave)
> -		s3c24xx_dma_unmap_buffers(txd);
> +		dma_descriptor_unmap(&vd->tx);
>  
>  	s3c24xx_dma_free_txd(txd);
>  }
>
diff mbox

Patch

diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c
index 085da4fe6613..4eddedb6eb7d 100644
--- a/drivers/dma/s3c24xx-dma.c
+++ b/drivers/dma/s3c24xx-dma.c
@@ -628,42 +628,13 @@  retry:
 	s3cchan->state = S3C24XX_DMA_CHAN_IDLE;
 }
 
-static void s3c24xx_dma_unmap_buffers(struct s3c24xx_txd *txd)
-{
-	struct device *dev = txd->vd.tx.chan->device->dev;
-	struct s3c24xx_sg *dsg;
-
-	if (!(txd->vd.tx.flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-		if (txd->vd.tx.flags & DMA_COMPL_SRC_UNMAP_SINGLE)
-			list_for_each_entry(dsg, &txd->dsg_list, node)
-				dma_unmap_single(dev, dsg->src_addr, dsg->len,
-						DMA_TO_DEVICE);
-		else {
-			list_for_each_entry(dsg, &txd->dsg_list, node)
-				dma_unmap_page(dev, dsg->src_addr, dsg->len,
-						DMA_TO_DEVICE);
-		}
-	}
-
-	if (!(txd->vd.tx.flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-		if (txd->vd.tx.flags & DMA_COMPL_DEST_UNMAP_SINGLE)
-			list_for_each_entry(dsg, &txd->dsg_list, node)
-				dma_unmap_single(dev, dsg->dst_addr, dsg->len,
-						DMA_FROM_DEVICE);
-		else
-			list_for_each_entry(dsg, &txd->dsg_list, node)
-				dma_unmap_page(dev, dsg->dst_addr, dsg->len,
-						DMA_FROM_DEVICE);
-	}
-}
-
 static void s3c24xx_dma_desc_free(struct virt_dma_desc *vd)
 {
 	struct s3c24xx_txd *txd = to_s3c24xx_txd(&vd->tx);
 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(vd->tx.chan);
 
 	if (!s3cchan->slave)
-		s3c24xx_dma_unmap_buffers(txd);
+		dma_descriptor_unmap(&vd->tx);
 
 	s3c24xx_dma_free_txd(txd);
 }