summaryrefslogtreecommitdiff
path: root/drivers/ata/sata_fsl.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-06-15 13:37:32 -0700
committerTejun Heo <tj@kernel.org>2014-06-17 10:23:26 -0400
commit94463a9cadc7f72a70ec6ee801109c2f1e44a123 (patch)
tree0c42668c893b52aadf1ee5f9e0f4f1ff9765114d /drivers/ata/sata_fsl.c
parentebe06187bf2aec10d537ce4595e416035367d703 (diff)
ata: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r--drivers/ata/sata_fsl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 616a6d2ac20c..07bc7e4dbd04 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -734,13 +734,12 @@ static int sata_fsl_port_start(struct ata_port *ap)
if (!pp)
return -ENOMEM;
- mem = dma_alloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma,
- GFP_KERNEL);
+ mem = dma_zalloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma,
+ GFP_KERNEL);
if (!mem) {
kfree(pp);
return -ENOMEM;
}
- memset(mem, 0, SATA_FSL_PORT_PRIV_DMA_SZ);
pp->cmdslot = mem;
pp->cmdslot_paddr = mem_dma;