* [PATCH] dmaengine: uniphier-mdmac: use devm_platform_ioremap_resource()
@ 2019-09-05 3:41 Masahiro Yamada
2019-09-25 20:21 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2019-09-05 3:41 UTC (permalink / raw)
To: Vinod Koul, dmaengine
Cc: linux-kernel, Masahiro Yamada, Dan Williams, linux-arm-kernel
Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource().
This allows to remove the local variable for (struct resource *), and
have one function call less.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/dma/uniphier-mdmac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/uniphier-mdmac.c b/drivers/dma/uniphier-mdmac.c
index ec65a7430dc4..e42f2312b7a1 100644
--- a/drivers/dma/uniphier-mdmac.c
+++ b/drivers/dma/uniphier-mdmac.c
@@ -385,7 +385,6 @@ static int uniphier_mdmac_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct uniphier_mdmac_device *mdev;
struct dma_device *ddev;
- struct resource *res;
int nr_chans, ret, i;
nr_chans = platform_irq_count(pdev);
@@ -401,8 +400,7 @@ static int uniphier_mdmac_probe(struct platform_device *pdev)
if (!mdev)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mdev->reg_base = devm_ioremap_resource(dev, res);
+ mdev->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mdev->reg_base))
return PTR_ERR(mdev->reg_base);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: uniphier-mdmac: use devm_platform_ioremap_resource()
2019-09-05 3:41 [PATCH] dmaengine: uniphier-mdmac: use devm_platform_ioremap_resource() Masahiro Yamada
@ 2019-09-25 20:21 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2019-09-25 20:21 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: dmaengine, linux-kernel, Dan Williams, linux-arm-kernel
On 05-09-19, 12:41, Masahiro Yamada wrote:
> Replace the chain of platform_get_resource() and devm_ioremap_resource()
> with devm_platform_ioremap_resource().
>
> This allows to remove the local variable for (struct resource *), and
> have one function call less.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-25 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 3:41 [PATCH] dmaengine: uniphier-mdmac: use devm_platform_ioremap_resource() Masahiro Yamada
2019-09-25 20:21 ` 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).