Commit 7243f331 authored by Hsin-Yi Wang's avatar Hsin-Yi Wang Committed by Mauro Carvalho Chehab
Browse files

media: mtk-vcodec: remove allocated dma_parms



Commit 9495b7e9 ("driver core: platform: Initialize dma_parms for
platform devices") included dma_parms in platform_device. There's no need
to allocate again.

Fixes: 13483fc2 ("media: mtk-vcodec: set dma max segment size")
Suggested-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarHsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6651dba2
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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))
+1 −8
Original line number Diff line number Diff line
@@ -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))