diff options
author | Hsin-Yi Wang <hsinyi@chromium.org> | 2020-09-03 07:48:33 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-16 10:31:15 +0100 |
commit | 7243f33120dd150150c5999127b3ba9fa567e1ac (patch) | |
tree | ec94c40ed068f631ff979cb697c1b818586bb197 /drivers | |
parent | 6651dba2bd838f34cf5a1e84229aaa579b1a94fe (diff) |
media: mtk-vcodec: remove allocated dma_parms
Commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for
platform devices") included dma_parms in platform_device. There's no need
to allocate again.
Fixes: 13483fc2f20f ("media: mtk-vcodec: set dma max segment size")
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 9 | ||||
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 9 |
2 files changed, 2 insertions, 16 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c index d14bc208ea5e..c7ed09fbafb6 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c @@ -232,14 +232,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev) mtk_v4l2_err("Could not get vdec IPI device"); return -ENODEV; } - if (!pdev->dev.dma_parms) { - pdev->dev.dma_parms = devm_kzalloc(&pdev->dev, - sizeof(*pdev->dev.dma_parms), - GFP_KERNEL); - if (!pdev->dev.dma_parms) - return -ENOMEM; - } - dma_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + dma_set_max_seg_size(&pdev->dev, UINT_MAX); dev->fw_handler = mtk_vcodec_fw_select(dev, fw_type, VPU_RST_DEC); if (IS_ERR(dev->fw_handler)) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c index dcfa2c2d4def..a2aa96b03f66 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c @@ -284,14 +284,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev) mtk_v4l2_err("Could not get venc IPI device"); return -ENODEV; } - if (!pdev->dev.dma_parms) { - pdev->dev.dma_parms = devm_kzalloc(&pdev->dev, - sizeof(*pdev->dev.dma_parms), - GFP_KERNEL); - if (!pdev->dev.dma_parms) - return -ENOMEM; - } - dma_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + dma_set_max_seg_size(&pdev->dev, UINT_MAX); dev->fw_handler = mtk_vcodec_fw_select(dev, fw_type, VPU_RST_ENC); if (IS_ERR(dev->fw_handler)) |