Skip to content

Commit

Permalink
media: venus: core: Drop local dma_parms
Browse files Browse the repository at this point in the history
Since commit 9495b7e ("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 <[email protected]>
Signed-off-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
rmurphy-arm authored and mchehab committed Sep 14, 2020
1 parent c4176e1 commit 0df720e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/media/platform/qcom/venus/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0df720e

Please sign in to comment.