diff options
author | Dan Williams <dan.j.williams@intel.com> | 2013-10-18 19:35:29 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2013-11-14 11:01:31 -0800 |
commit | 7476bd79fc019dd9a8361de6696627a4eae3ef05 (patch) | |
tree | b95b39b60a38c2b84e668eb97c87bf2aeb6eedb2 /drivers/dma/dmaengine.c | |
parent | 3bbdd49872931b8c4282aeb1cab5af7cce2cfb0d (diff) | |
download | talos-obmc-linux-7476bd79fc019dd9a8361de6696627a4eae3ef05.tar.gz talos-obmc-linux-7476bd79fc019dd9a8361de6696627a4eae3ef05.zip |
async_pq: convert to dmaengine_unmap_data
Use the generic unmap object to unmap dma buffers.
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
[bzolnier: keep temporary dma_dest array in do_async_gen_syndrome()]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r-- | drivers/dma/dmaengine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 54138b57b37c..f878c808466e 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -953,9 +953,12 @@ static void dmaengine_unmap(struct kref *kref) dma_unmap_page(dev, unmap->addr[i], unmap->len, DMA_FROM_DEVICE); cnt += unmap->bidi_cnt; - for (; i < cnt; i++) + for (; i < cnt; i++) { + if (unmap->addr[i] == 0) + continue; dma_unmap_page(dev, unmap->addr[i], unmap->len, DMA_BIDIRECTIONAL); + } mempool_free(unmap, __get_unmap_pool(cnt)->pool); } |