提交 6de84023 编写于 作者: S Souptick Joarder 提交者: Jassi Brar

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

Use dma_pool_zalloc() instead of dma_pool_alloc + memset
Signed-off-by: NSouptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 0aa3fdb8
......@@ -1268,7 +1268,7 @@ static int flexrm_startup(struct mbox_chan *chan)
}
/* 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);
if (!ring->cmpl_base) {
dev_err(ring->mbox->dev,
......@@ -1277,7 +1277,6 @@ static int flexrm_startup(struct mbox_chan *chan)
ret = -ENOMEM;
goto fail_free_bd_memory;
}
memset(ring->cmpl_base, 0, RING_CMPL_SIZE);
/* Request IRQ */
if (ring->irq == UINT_MAX) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册