* [PATCH] dmaengine: sprd: Change to use devm_platform_ioremap_resource()
@ 2019-09-27 3:29 Baolin Wang
2019-10-15 10:13 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Baolin Wang @ 2019-09-27 3:29 UTC (permalink / raw)
To: vkoul
Cc: orsonzhai, zhang.lyra, dan.j.williams, linux-kernel, dmaengine,
baolin.wang
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together, which can simpify the code.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
drivers/dma/sprd-dma.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index a4a91f2..60d2c6b 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -1065,7 +1065,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct sprd_dma_dev *sdev;
struct sprd_dma_chn *dma_chn;
- struct resource *res;
u32 chn_count;
int ret, i;
@@ -1111,8 +1110,7 @@ static int sprd_dma_probe(struct platform_device *pdev)
dev_warn(&pdev->dev, "no interrupts for the dma controller\n");
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sdev->glb_base = devm_ioremap_resource(&pdev->dev, res);
+ sdev->glb_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sdev->glb_base))
return PTR_ERR(sdev->glb_base);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: sprd: Change to use devm_platform_ioremap_resource()
2019-09-27 3:29 [PATCH] dmaengine: sprd: Change to use devm_platform_ioremap_resource() Baolin Wang
@ 2019-10-15 10:13 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2019-10-15 10:13 UTC (permalink / raw)
To: Baolin Wang
Cc: orsonzhai, zhang.lyra, dan.j.williams, linux-kernel, dmaengine
On 27-09-19, 11:29, Baolin Wang wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together, which can simpify the code.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-15 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 3:29 [PATCH] dmaengine: sprd: Change to use devm_platform_ioremap_resource() Baolin Wang
2019-10-15 10:13 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).