summaryrefslogtreecommitdiffstats
path: root/drivers/dma/imx-sdma.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-06-15 13:37:35 -0700
committerVinod Koul <vinod.koul@intel.com>2014-07-14 22:29:35 +0530
commit9f92d2232d5fabe18741044d8004160f8cf80e9e (patch)
treefd8f2e649ad34f0b44d9aee726476b7408e1d334 /drivers/dma/imx-sdma.c
parent89751d0a2a05197e0823eb0a363efd034175a76f (diff)
downloadlinux-9f92d2232d5fabe18741044d8004160f8cf80e9e.tar.gz
linux-9f92d2232d5fabe18741044d8004160f8cf80e9e.tar.bz2
linux-9f92d2232d5fabe18741044d8004160f8cf80e9e.zip
dmaengine: 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: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/imx-sdma.c')
-rw-r--r--drivers/dma/imx-sdma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 14867e3ac8ff..bbcf783707f1 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -911,14 +911,13 @@ static int sdma_request_channel(struct sdma_channel *sdmac)
int channel = sdmac->channel;
int ret = -EBUSY;
- sdmac->bd = dma_alloc_coherent(NULL, PAGE_SIZE, &sdmac->bd_phys, GFP_KERNEL);
+ sdmac->bd = dma_zalloc_coherent(NULL, PAGE_SIZE, &sdmac->bd_phys,
+ GFP_KERNEL);
if (!sdmac->bd) {
ret = -ENOMEM;
goto out;
}
- memset(sdmac->bd, 0, PAGE_SIZE);
-
sdma->channel_control[channel].base_bd_ptr = sdmac->bd_phys;
sdma->channel_control[channel].current_bd_ptr = sdmac->bd_phys;