mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/6] power: reset: at91-poweroff: Convert to devm_platform_ioremap_resource()
@ 2023-07-04 13:03 Yangtao Li
  2023-07-04 13:03 ` [PATCH 2/6] power: reset: at91-sama5d2_shdwc: " Yangtao Li
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Yangtao Li @ 2023-07-04 13:03 UTC (permalink / raw)
  To: Sebastian Reichel, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: Yangtao Li, linux-pm, linux-arm-kernel, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c
index 9e74e131c675..dd5399785b69 100644
--- a/drivers/power/reset/at91-poweroff.c
+++ b/drivers/power/reset/at91-poweroff.c
@@ -151,13 +151,11 @@ static void at91_poweroff_dt_set_wakeup_mode(struct platform_device *pdev)
 
 static int __init at91_poweroff_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct device_node *np;
 	u32 ddr_type;
 	int ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	at91_shdwc.shdwc_base = devm_ioremap_resource(&pdev->dev, res);
+	at91_shdwc.shdwc_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(at91_shdwc.shdwc_base))
 		return PTR_ERR(at91_shdwc.shdwc_base);
 
-- 
2.39.0


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

end of thread, other threads:[~2023-07-19 21:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 13:03 [PATCH 1/6] power: reset: at91-poweroff: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-04 13:03 ` [PATCH 2/6] power: reset: at91-sama5d2_shdwc: " Yangtao Li
2023-07-04 13:03 ` [PATCH 3/6] power: reset: brcm-kona: " Yangtao Li
2023-07-04 14:48   ` Florian Fainelli
2023-07-04 13:03 ` [PATCH 4/6] power: reset: gemini-poweroff: " Yangtao Li
2023-07-04 13:03 ` [PATCH 5/6] power: reset: msm: " Yangtao Li
2023-07-04 13:03 ` [PATCH 6/6] power: reset: ocelot: " Yangtao Li
2023-07-19 21:37 ` [PATCH 1/6] power: reset: at91-poweroff: " Sebastian Reichel

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

all inboxes | Powered by JetHome®