powerpc/pasemi: Use dma_zalloc_coherent()
Replace dma_alloc_coherent() + memset() with dma_zalloc_coherent(). Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
af8511cf32
commit
c3d6a64bd1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue