diff options
author | Souptick Joarder <jrdr.linux@gmail.com> | 2016-11-29 16:00:37 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-11-29 22:20:46 -0500 |
commit | 9dcd74089a1ecf73ea4a355ee097b5b218ccf3dc (patch) | |
tree | 5f26f0d120ac1cdd1932f36853104294e40420ea | |
parent | c2e60fc702db68029e32c1fe00a9683dcb29316b (diff) |
dmaengine: at_xdmac: Use dma_pool_zalloc
We should use dma_pool_zalloc instead of dma_pool_alloc/memset.
Signed-off-by: Souptick joarder <jrdr.linux@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/at_xdmac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index b7d7f2d443a1..40287ff92768 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c | |||
@@ -444,9 +444,8 @@ static struct at_xdmac_desc *at_xdmac_alloc_desc(struct dma_chan *chan, | |||
444 | struct at_xdmac *atxdmac = to_at_xdmac(chan->device); | 444 | struct at_xdmac *atxdmac = to_at_xdmac(chan->device); |
445 | dma_addr_t phys; | 445 | dma_addr_t phys; |
446 | 446 | ||
447 | desc = dma_pool_alloc(atxdmac->at_xdmac_desc_pool, gfp_flags, &phys); | 447 | desc = dma_pool_zalloc(atxdmac->at_xdmac_desc_pool, gfp_flags, &phys); |
448 | if (desc) { | 448 | if (desc) { |
449 | memset(desc, 0, sizeof(*desc)); | ||
450 | INIT_LIST_HEAD(&desc->descs_list); | 449 | INIT_LIST_HEAD(&desc->descs_list); |
451 | dma_async_tx_descriptor_init(&desc->tx_dma_desc, chan); | 450 | dma_async_tx_descriptor_init(&desc->tx_dma_desc, chan); |
452 | desc->tx_dma_desc.tx_submit = at_xdmac_tx_submit; | 451 | desc->tx_dma_desc.tx_submit = at_xdmac_tx_submit; |