Skip to content

Commit

Permalink
dma: fix build breakage in s3c24xx-dma
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Dan Williams authored and Vinod Koul committed Dec 4, 2013
1 parent 89116bf commit 85726de
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions drivers/dma/s3c24xx-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,42 +628,13 @@ static void s3c24xx_dma_phy_free(struct s3c24xx_dma_chan *s3cchan)
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);
}
Expand Down

0 comments on commit 85726de

Please sign in to comment.