projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbd1d63
)
dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
author
Markus Elfring
<elfring@users.sourceforge.net>
Sun, 22 Sep 2019 09:18:27 +0000
(11:18 +0200)
committer
Vinod Koul
<vkoul@kernel.org>
Mon, 14 Oct 2019 07:51:20 +0000
(13:21 +0530)
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 <elfring@users.sourceforge.net>
Link:
https://lore.kernel.org/r/5dd19f28-349a-4957-ea3a-6aebbd7c97e2@web.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-jz4780.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dma/dma-jz4780.c
b/drivers/dma/dma-jz4780.c
index cafb1cc065bb76f397541f54bb597982dbc4ece4..f42b3ef8e0360b61c198685654159f0fa2c44585 100644
(file)
--- a/
drivers/dma/dma-jz4780.c
+++ b/
drivers/dma/dma-jz4780.c
@@
-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);