mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
async_pq: convert to dmaengine_unmap_data
Use the generic unmap object to unmap dma buffers. Cc: Vinod Koul <[email protected]> Cc: Tomasz Figa <[email protected]> Cc: Dave Jiang <[email protected]> Reported-by: Bartlomiej Zolnierkiewicz <[email protected]> [bzolnier: keep temporary dma_dest array in do_async_gen_syndrome()] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
3bbdd49872
commit
7476bd79fc
2 changed files with 69 additions and 53 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue