Commit c3d6a64b authored by Sabyasachi Gupta's avatar Sabyasachi Gupta Committed by Michael Ellerman

powerpc/pasemi: Use dma_zalloc_coherent()

Replace dma_alloc_coherent() + memset() with dma_zalloc_coherent().
Signed-off-by: default avatarSabyasachi Gupta <sabyasachi.linux@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent af8511cf
......@@ -255,15 +255,13 @@ int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size)
chan->ring_size = ring_size;
chan->ring_virt = dma_alloc_coherent(&dma_pdev->dev,
chan->ring_virt = dma_zalloc_coherent(&dma_pdev->dev,
ring_size * sizeof(u64),
&chan->ring_dma, GFP_KERNEL);
if (!chan->ring_virt)
return -ENOMEM;
memset(chan->ring_virt, 0, ring_size * sizeof(u64));
return 0;
}
EXPORT_SYMBOL(pasemi_dma_alloc_ring);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment