Commit 1526dbeb authored by zhong jiang's avatar zhong jiang Committed by Mauro Carvalho Chehab

media: ipu3-cio2: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset

dma_zalloc_coherent has implemented the dma_alloc_coherent() + memset(),
We prefer to dma_zalloc_coherent instead of open-codeing.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 4d471563
...@@ -218,13 +218,11 @@ static int cio2_fbpt_init(struct cio2_device *cio2, struct cio2_queue *q) ...@@ -218,13 +218,11 @@ static int cio2_fbpt_init(struct cio2_device *cio2, struct cio2_queue *q)
{ {
struct device *dev = &cio2->pci_dev->dev; struct device *dev = &cio2->pci_dev->dev;
q->fbpt = dma_alloc_coherent(dev, CIO2_FBPT_SIZE, &q->fbpt_bus_addr, q->fbpt = dma_zalloc_coherent(dev, CIO2_FBPT_SIZE, &q->fbpt_bus_addr,
GFP_KERNEL); GFP_KERNEL);
if (!q->fbpt) if (!q->fbpt)
return -ENOMEM; return -ENOMEM;
memset(q->fbpt, 0, CIO2_FBPT_SIZE);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment