Thread (12 messages) read the whole thread 12 messages, 5 authors, 2022-06-01

Re: [PATCH v5 3/4] mtd: rawnand: meson: refine resource getting in probe

From: Neil Armstrong <hidden>
Date: 2022-05-13 13:12:14
Also in: linux-amlogic, lkml

On 13/05/2022 14:34, Liang Yang wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Liang Yang <liang.yang@amlogic.com>
---
  drivers/mtd/nand/raw/meson_nand.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index cc93667a1e7f..6e50387475bb 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -1378,7 +1378,6 @@ static int meson_nfc_probe(struct platform_device *pdev)
  {
  	struct device *dev = &pdev->dev;
  	struct meson_nfc *nfc;
-	struct resource *res;
  	int ret, irq;
  
  	nfc = devm_kzalloc(dev, sizeof(*nfc), GFP_KERNEL);
@@ -1395,8 +1394,7 @@ static int meson_nfc_probe(struct platform_device *pdev)
  
  	nfc->dev = dev;
  
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	nfc->reg_base = devm_ioremap_resource(dev, res);
+	nfc->reg_base = devm_platform_ioremap_resource_byname(pdev, "nfc");
  	if (IS_ERR(nfc->reg_base))
  		return PTR_ERR(nfc->reg_base);
  
Reviewed-by: Neil Armstrong <redacted>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help