Commit 6de84023 authored by Souptick Joarder's avatar Souptick Joarder Committed by Jassi Brar

maillbox: bcm-flexrm-mailbox: Use dma_pool_zalloc()

Use dma_pool_zalloc() instead of dma_pool_alloc + memset
Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 0aa3fdb8
...@@ -1268,7 +1268,7 @@ static int flexrm_startup(struct mbox_chan *chan) ...@@ -1268,7 +1268,7 @@ static int flexrm_startup(struct mbox_chan *chan)
} }
/* Allocate completion memory */ /* Allocate completion memory */
ring->cmpl_base = dma_pool_alloc(ring->mbox->cmpl_pool, ring->cmpl_base = dma_pool_zalloc(ring->mbox->cmpl_pool,
GFP_KERNEL, &ring->cmpl_dma_base); GFP_KERNEL, &ring->cmpl_dma_base);
if (!ring->cmpl_base) { if (!ring->cmpl_base) {
dev_err(ring->mbox->dev, dev_err(ring->mbox->dev,
...@@ -1277,7 +1277,6 @@ static int flexrm_startup(struct mbox_chan *chan) ...@@ -1277,7 +1277,6 @@ static int flexrm_startup(struct mbox_chan *chan)
ret = -ENOMEM; ret = -ENOMEM;
goto fail_free_bd_memory; goto fail_free_bd_memory;
} }
memset(ring->cmpl_base, 0, RING_CMPL_SIZE);
/* Request IRQ */ /* Request IRQ */
if (ring->irq == UINT_MAX) { if (ring->irq == UINT_MAX) {
......
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