public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing
@ 2024-01-15 14:12 Uwe Kleine-König
  2024-02-05 14:49 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2024-01-15 14:12 UTC (permalink / raw)
  To: Miquel Raynal, Vignesh Raghavendra; +Cc: Richard Weinberger, linux-mtd, kernel

If during probe fsl_lbc_ctrl_dev is NULL that might just be because the
fsl_lbc driver didn't bind yet. So return -EPROBE_DEFER in this case to
make the driver core retry probing later.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/mtd/nand/raw/fsl_elbc_nand.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c
index 1e3a80f06f33..df6a0d5c86bb 100644
--- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
@@ -869,7 +869,8 @@ static int fsl_elbc_nand_probe(struct platform_device *pdev)
 	struct mtd_info *mtd;
 
 	if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
-		return -ENODEV;
+		return dev_err_probe(&pdev->dev, -EPROBE_DEFER, "lbc_ctrl_dev missing\n");
+
 	lbc = fsl_lbc_ctrl_dev->regs;
 	dev = fsl_lbc_ctrl_dev->dev;
 
-- 
2.43.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing
  2024-01-15 14:12 [PATCH] mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing Uwe Kleine-König
@ 2024-02-05 14:49 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2024-02-05 14:49 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Vignesh Raghavendra, Richard Weinberger, linux-mtd, kernel

Hi Uwe,

u.kleine-koenig@pengutronix.de wrote on Mon, 15 Jan 2024 15:12:46 +0100:

> If during probe fsl_lbc_ctrl_dev is NULL that might just be because the
> fsl_lbc driver didn't bind yet. So return -EPROBE_DEFER in this case to
> make the driver core retry probing later.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied to nand/next, thanks!

Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2024-02-05 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 14:12 [PATCH] mtd: rawnand: fsl_elbc: Let .probe retry if local bus is missing Uwe Kleine-König
2024-02-05 14:49 ` Miquel Raynal

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