All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] mfd: atmel-hlcdc: Convert to devm_platform_ioremap_resource()
@ 2023-07-06 11:39 ` Yangtao Li
  0 siblings, 0 replies; 20+ messages in thread
From: Yangtao Li @ 2023-07-06 11:39 UTC (permalink / raw)
  To: Lee Jones, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: Yangtao Li, linux-arm-kernel, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
index 3c2414ba4b01..20de7f49a830 100644
--- a/drivers/mfd/atmel-hlcdc.c
+++ b/drivers/mfd/atmel-hlcdc.c
@@ -83,7 +83,6 @@ static int atmel_hlcdc_probe(struct platform_device *pdev)
 	struct atmel_hlcdc_regmap *hregmap;
 	struct device *dev = &pdev->dev;
 	struct atmel_hlcdc *hlcdc;
-	struct resource *res;
 
 	hregmap = devm_kzalloc(dev, sizeof(*hregmap), GFP_KERNEL);
 	if (!hregmap)
@@ -93,8 +92,7 @@ static int atmel_hlcdc_probe(struct platform_device *pdev)
 	if (!hlcdc)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hregmap->regs = devm_ioremap_resource(dev, res);
+	hregmap->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hregmap->regs))
 		return PTR_ERR(hregmap->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] 20+ messages in thread

end of thread, other threads:[~2023-07-13 13:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-06 11:39 [PATCH 1/7] mfd: atmel-hlcdc: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-06 11:39 ` Yangtao Li
2023-07-06 11:39 ` [PATCH 2/7] mfd: omap-usb-tll: " Yangtao Li
2023-07-13 13:39   ` Lee Jones
2023-07-06 11:39 ` [PATCH 3/7] mfd: ti_am335x_tscadc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-13 13:40   ` Lee Jones
2023-07-06 11:39 ` [PATCH 4/7] mfd: exynos-lpass: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-06 11:39   ` Yangtao Li
2023-07-13 13:41   ` Lee Jones
2023-07-13 13:41     ` Lee Jones
2023-07-06 11:39 ` [PATCH 5/7] mfd: omap-usb-host: " Yangtao Li
2023-07-13 13:41   ` Lee Jones
2023-07-06 11:39 ` [PATCH 6/7] mfd: stm32-timers: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-06 11:39   ` Yangtao Li
2023-07-13 13:41   ` Lee Jones
2023-07-13 13:41     ` Lee Jones
2023-07-06 11:39 ` [PATCH 7/7] mfd: hi655x-pmic: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-13 13:42   ` Lee Jones
2023-07-13 13:39 ` [PATCH 1/7] mfd: atmel-hlcdc: " Lee Jones
2023-07-13 13:39   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.