summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSabyasachi Gupta <sabyasachi.linux@gmail.com>2018-11-05 05:22:48 +0300
committerScott Wood <oss@buserror.net>2018-12-22 04:53:20 +0300
commit7811eade247cdf90b26dd0951613e77614192771 (patch)
tree0cb98672ef99a5666742d94a9d33eba0b3f4c4ae
parent8c6c942d33f2a79439e86f8f406afae40a5bc767 (diff)
downloadlinux-7811eade247cdf90b26dd0951613e77614192771.tar.xz
arch/powerpc/fsl_rmu: Use dma_zalloc_coherent
Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Signed-off-by: Scott Wood <oss@buserror.net>
-rw-r--r--arch/powerpc/sysdev/fsl_rmu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c
index 88b35a3dcdc5..8b0ebf3940d2 100644
--- a/arch/powerpc/sysdev/fsl_rmu.c
+++ b/arch/powerpc/sysdev/fsl_rmu.c
@@ -756,15 +756,13 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
}
/* 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.phys, GFP_KERNEL);
if (!rmu->msg_tx_ring.virt) {
rc = -ENOMEM;
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;
/* Point dequeue/enqueue pointers at first entry in ring */