Commit 0df720e5 authored by Robin Murphy's avatar Robin Murphy Committed by Mauro Carvalho Chehab
Browse files

media: venus: core: Drop local dma_parms



Since commit 9495b7e9 ("driver core: platform: Initialize dma_parms
for platform devices"), struct platform_device already provides a
dma_parms structure, so we can save allocating another one.

Also the DMA segment size is simply a size, not a bitmask.

Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent c4176e12
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -227,15 +227,7 @@ static int venus_probe(struct platform_device *pdev)
	if (ret)
		goto err_core_put;

	if (!dev->dma_parms) {
		dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
					      GFP_KERNEL);
		if (!dev->dma_parms) {
			ret = -ENOMEM;
			goto err_core_put;
		}
	}
	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
	dma_set_max_seg_size(dev, UINT_MAX);

	INIT_LIST_HEAD(&core->instances);
	mutex_init(&core->lock);