projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d4d6c2
)
dmaengine: mediatek: Use devm_platform_ioremap_resource() in mtk_cqdma_probe()
author
Markus Elfring
<elfring@users.sourceforge.net>
Sun, 22 Sep 2019 10:52:25 +0000
(12:52 +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/c7e3bbae-44fa-9019-18ee-c6cdfd7c2a14@web.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/mediatek/mtk-cqdma.c
patch
|
blob
|
history
diff --git
a/drivers/dma/mediatek/mtk-cqdma.c
b/drivers/dma/mediatek/mtk-cqdma.c
index 723b11c190b37e6f5ca93c6238feee3624a78414..6bf838e63be1a99bd3575cf3ed72f48062b9a02a 100644
(file)
--- a/
drivers/dma/mediatek/mtk-cqdma.c
+++ b/
drivers/dma/mediatek/mtk-cqdma.c
@@
-819,15
+819,7
@@
static int mtk_cqdma_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&cqdma->pc[i]->queue);
spin_lock_init(&cqdma->pc[i]->lock);
refcount_set(&cqdma->pc[i]->refcnt, 0);
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, i);
- if (!res) {
- dev_err(&pdev->dev, "No mem resource for %s\n",
- dev_name(&pdev->dev));
- return -EINVAL;
- }
-
- cqdma->pc[i]->base = devm_ioremap_resource(&pdev->dev, res);
+ cqdma->pc[i]->base = devm_platform_ioremap_resource(pdev, i);
if (IS_ERR(cqdma->pc[i]->base))
return PTR_ERR(cqdma->pc[i]->base);