diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-12-06 23:06:22 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-12-08 10:54:17 -0500 |
commit | 12154c87374c90b3b6bc169e1162aa4a27e91a63 (patch) | |
tree | bb888ea8a3c1056039e691e5a87ca0d6f0928762 | |
parent | d3f8dc42024b09974a4a1501d4e8852a025f1c15 (diff) |
dmaengine: at_hdmac: move to dma_pool_zalloc
Replace dma_pool_alloc & memset with dma_pool_zalloc.
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/at_hdmac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index a4c8f80db29d..1baf3404a365 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -111,9 +111,8 @@ static struct at_desc *atc_alloc_descriptor(struct dma_chan *chan, | |||
111 | struct at_dma *atdma = to_at_dma(chan->device); | 111 | struct at_dma *atdma = to_at_dma(chan->device); |
112 | dma_addr_t phys; | 112 | dma_addr_t phys; |
113 | 113 | ||
114 | desc = dma_pool_alloc(atdma->dma_desc_pool, gfp_flags, &phys); | 114 | desc = dma_pool_zalloc(atdma->dma_desc_pool, gfp_flags, &phys); |
115 | if (desc) { | 115 | if (desc) { |
116 | memset(desc, 0, sizeof(struct at_desc)); | ||
117 | INIT_LIST_HEAD(&desc->tx_list); | 116 | INIT_LIST_HEAD(&desc->tx_list); |
118 | dma_async_tx_descriptor_init(&desc->txd, chan); | 117 | dma_async_tx_descriptor_init(&desc->txd, chan); |
119 | /* txd.flags will be overwritten in prep functions */ | 118 | /* txd.flags will be overwritten in prep functions */ |