public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 01/18] mtd: rawnand: sunxi: Use devm_platform_get_and_ioremap_resource()
@ 2023-07-07  4:06 Yangtao Li
  2023-07-07  4:06 ` [PATCH 02/18] mtd: rawnand: lpc32xx_slc: " Yangtao Li
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-07  4:06 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Yangtao Li, linux-mtd, linux-arm-kernel, linux-sunxi,
	linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mtd/nand/raw/sunxi_nand.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 9884304634f6..db36bd755b8d 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -2087,8 +2087,7 @@ static int sunxi_nfc_probe(struct platform_device *pdev)
 	nand_controller_init(&nfc->controller);
 	INIT_LIST_HEAD(&nfc->chips);
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	nfc->regs = devm_ioremap_resource(dev, r);
+	nfc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
 	if (IS_ERR(nfc->regs))
 		return PTR_ERR(nfc->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] 13+ messages in thread

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-07  4:06 [PATCH 01/18] mtd: rawnand: sunxi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07  4:06 ` [PATCH 02/18] mtd: rawnand: lpc32xx_slc: " Yangtao Li
2023-07-13  7:58   ` Miquel Raynal
2023-07-07  4:06 ` [PATCH 06/18] mtd: rawnand: stm32_fmc2: " Yangtao Li
2023-07-13  7:58   ` Miquel Raynal
2023-07-07  4:06 ` [PATCH 07/18] mtd: rawnand: lpc32xx_mlc: " Yangtao Li
2023-07-13  7:58   ` Miquel Raynal
2023-07-07  4:06 ` [PATCH 10/18] mtd: rawnand: atmel: " Yangtao Li
2023-07-13  7:57   ` Miquel Raynal
2023-07-11 18:23 ` [PATCH 01/18] mtd: rawnand: sunxi: " Jernej Škrabec
2023-07-12 11:54 ` Miquel Raynal
2023-07-12 12:06   ` Miquel Raynal
2023-07-13  7:58 ` Miquel Raynal

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