Skip to content

Commit

Permalink
dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma…
Browse files Browse the repository at this point in the history
…_probe()

Simplify this function implementation a bit by using
a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
elfring authored and vinodkoul committed Oct 14, 2019
1 parent fbd1d63 commit 1148ac6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/dma/dma-jz4780.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,13 +858,7 @@ static int jz4780_dma_probe(struct platform_device *pdev)
jzdma->soc_data = soc_data;
platform_set_drvdata(pdev, jzdma);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "failed to get I/O memory\n");
return -EINVAL;
}

jzdma->chn_base = devm_ioremap_resource(dev, res);
jzdma->chn_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(jzdma->chn_base))
return PTR_ERR(jzdma->chn_base);

Expand Down

0 comments on commit 1148ac6

Please sign in to comment.