public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/7] bus: sunxi-rsb: Convert to devm_platform_ioremap_resource()
@ 2023-07-06  7:20 Yangtao Li
  2023-07-06  7:20 ` [PATCH 6/7] bus: vexpress-config: " Yangtao Li
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Yangtao Li @ 2023-07-06  7:20 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Yangtao Li, linux-arm-kernel, linux-sunxi, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/bus/sunxi-rsb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index 696c0aefb0ca..2aefd5dde3c9 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -746,7 +746,6 @@ static int sunxi_rsb_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
-	struct resource *r;
 	struct sunxi_rsb *rsb;
 	u32 clk_freq = 3000000;
 	int irq, ret;
@@ -766,8 +765,7 @@ static int sunxi_rsb_probe(struct platform_device *pdev)
 	rsb->dev = dev;
 	rsb->clk_freq = clk_freq;
 	platform_set_drvdata(pdev, rsb);
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	rsb->regs = devm_ioremap_resource(dev, r);
+	rsb->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(rsb->regs))
 		return PTR_ERR(rsb->regs);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-30 22:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-06  7:20 [PATCH 1/7] bus: sunxi-rsb: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-06  7:20 ` [PATCH 6/7] bus: vexpress-config: " Yangtao Li
2023-07-19 10:06   ` [PATCH 6/7] " Sudeep Holla
2023-07-11 18:25 ` [PATCH 1/7] bus: sunxi-rsb: " Jernej Škrabec
2023-07-21 15:28 ` (subset) " Thierry Reding
2023-07-30 22:50 ` Jernej Škrabec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox