提交 9dcd7408 编写于 作者: S Souptick Joarder 提交者: Vinod Koul

dmaengine: at_xdmac: Use dma_pool_zalloc

We should use dma_pool_zalloc instead of dma_pool_alloc/memset.
Signed-off-by: NSouptick joarder <jrdr.linux@gmail.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 c2e60fc7
...@@ -444,9 +444,8 @@ static struct at_xdmac_desc *at_xdmac_alloc_desc(struct dma_chan *chan, ...@@ -444,9 +444,8 @@ static struct at_xdmac_desc *at_xdmac_alloc_desc(struct dma_chan *chan,
struct at_xdmac *atxdmac = to_at_xdmac(chan->device); struct at_xdmac *atxdmac = to_at_xdmac(chan->device);
dma_addr_t phys; dma_addr_t phys;
desc = dma_pool_alloc(atxdmac->at_xdmac_desc_pool, gfp_flags, &phys); desc = dma_pool_zalloc(atxdmac->at_xdmac_desc_pool, gfp_flags, &phys);
if (desc) { if (desc) {
memset(desc, 0, sizeof(*desc));
INIT_LIST_HEAD(&desc->descs_list); INIT_LIST_HEAD(&desc->descs_list);
dma_async_tx_descriptor_init(&desc->tx_dma_desc, chan); dma_async_tx_descriptor_init(&desc->tx_dma_desc, chan);
desc->tx_dma_desc.tx_submit = at_xdmac_tx_submit; desc->tx_dma_desc.tx_submit = at_xdmac_tx_submit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册