media: venus: core: Drop local dma_parms

Since commit 9495b7e92f ("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: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Robin Murphy 2020-09-03 23:14:26 +02:00 коммит произвёл Mauro Carvalho Chehab
Родитель c4176e12a7
Коммит 0df720e59d
1 изменённых файлов: 1 добавлений и 9 удалений

Просмотреть файл

@ -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);