From 2a1bbe26d3640c87ee4e3331fc3200de9a052d44 Mon Sep 17 00:00:00 2001 From: xuhua zhang Date: Fri, 7 Sep 2018 15:24:32 +0800 Subject: [PATCH] vdin: fix vdin dobly addr alloc error. PD#155104: fix vdin dobly addr alloc error. Change-Id: Iaabf5ed9513f37b438eeb2e00d43d1ecc6b1c5f8 Signed-off-by: xuhua zhang --- drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c index b4b6cc6..421d3d9 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include #include @@ -3481,7 +3483,7 @@ void vdin_dolby_addr_alloc(struct vdin_dev_s *devp, unsigned int size) unsigned int index, alloc_size; alloc_size = dolby_size_byte*size; - devp->dv.dv_dma_vaddr = dma_alloc_coherent(devp->dev, + devp->dv.dv_dma_vaddr = dma_alloc_coherent(&devp->this_pdev->dev, alloc_size, &devp->dv.dv_dma_paddr, GFP_KERNEL); if (!devp->dv.dv_dma_vaddr) { pr_info("%s:dmaalloc_coherent fail!!\n", __func__); @@ -3517,7 +3519,7 @@ void vdin_dolby_addr_release(struct vdin_dev_s *devp, unsigned int size) alloc_size = dolby_size_byte*size; if (devp->dv.dv_dma_vaddr) - dma_free_coherent(devp->dev, alloc_size, + dma_free_coherent(&devp->this_pdev->dev, alloc_size, devp->dv.dv_dma_vaddr, devp->dv.dv_dma_paddr); devp->dv.dv_dma_vaddr = NULL; } -- 2.7.4