diff options
author | Sabyasachi Gupta <sabyasachi.linux@gmail.com> | 2018-11-05 06:28:23 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-11-25 09:11:22 +0300 |
commit | c3d6a64bd1e82ea486bff46b17d5403c2d2602d6 (patch) | |
tree | 4511100d81070464e2d8daff4ba343e79646877e /arch/powerpc/platforms/pasemi | |
parent | af8511cf32189ba66c7e2a4146f11c86c9813ab7 (diff) | |
download | linux-c3d6a64bd1e82ea486bff46b17d5403c2d2602d6.tar.xz |
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>
Diffstat (limited to 'arch/powerpc/platforms/pasemi')
-rw-r--r-- | arch/powerpc/platforms/pasemi/dma_lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c index 53384eb42a76..d18d16489a15 100644 --- a/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/arch/powerpc/platforms/pasemi/dma_lib.c @@ -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); |