diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-12-07 05:06:22 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-12-08 16:54:21 +0100 |
commit | 646b3b569e9ac54436b93bd91e0c0e111178bec0 (patch) | |
tree | 577c73b5537bc46a24bb9922beb862e663d6d1d5 /drivers | |
parent | dmaengine: at_hdmac: move to dma_pool_zalloc (diff) | |
download | linux-646b3b569e9ac54436b93bd91e0c0e111178bec0.tar.xz linux-646b3b569e9ac54436b93bd91e0c0e111178bec0.zip |
dmaengine: k3dma: move to dma_pool_zalloc
Replace dma_pool_alloc & memset with dma_pool_zalloc.
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/dma/k3dma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index aabcb7934b05..01e25c68dd5a 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -458,13 +458,12 @@ static struct k3_dma_desc_sw *k3_dma_alloc_desc_resource(int num, if (!ds) return NULL; - ds->desc_hw = dma_pool_alloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); + ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); if (!ds->desc_hw) { dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc); kfree(ds); return NULL; } - memset(ds->desc_hw, 0, sizeof(struct k3_desc_hw) * num); ds->desc_num = num; return ds; } |