Commit 7811eade authored by Sabyasachi Gupta's avatar Sabyasachi Gupta Committed by Scott Wood

arch/powerpc/fsl_rmu: Use dma_zalloc_coherent

Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
Signed-off-by: default avatarSabyasachi Gupta <sabyasachi.linux@gmail.com>
Signed-off-by: default avatarScott Wood <oss@buserror.net>
parent 8c6c942d
...@@ -756,15 +756,13 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) ...@@ -756,15 +756,13 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
} }
/* Initialize outbound message descriptor ring */ /* Initialize outbound message descriptor ring */
rmu->msg_tx_ring.virt = dma_alloc_coherent(priv->dev, rmu->msg_tx_ring.virt = dma_zalloc_coherent(priv->dev,
rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE, rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE,
&rmu->msg_tx_ring.phys, GFP_KERNEL); &rmu->msg_tx_ring.phys, GFP_KERNEL);
if (!rmu->msg_tx_ring.virt) { if (!rmu->msg_tx_ring.virt) {
rc = -ENOMEM; rc = -ENOMEM;
goto out_dma; goto out_dma;
} }
memset(rmu->msg_tx_ring.virt, 0,
rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE);
rmu->msg_tx_ring.tx_slot = 0; rmu->msg_tx_ring.tx_slot = 0;
/* Point dequeue/enqueue pointers at first entry in ring */ /* Point dequeue/enqueue pointers at first entry in 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