Message ID | 41a042207ef791c4c5bcb46f09f63c40c6aa321b.1705944943.git.u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | c7f0f920ddfd12999335eee44f488bcf773edfb4 |
Headers | show |
Series | spi: get rid of some legacy macros | expand |
Hi Uwe, u.kleine-koenig@pengutronix.de wrote on Mon, 22 Jan 2024 19:07:08 +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. Despite the probable usefulness of this change, I don't see any relationship with the current series. So unless there is a good reason I might take this one through the nand tree. Also, what about a Fixes/Cc: stable tag here? > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Thanks, Miquèl
Hi Miquèl, On Mon, Jan 22, 2024 at 07:19:44PM +0100, Miquel Raynal wrote: > u.kleine-koenig@pengutronix.de wrote on Mon, 22 Jan 2024 19:07:08 +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. > > Despite the probable usefulness of this change, I don't see any > relationship with the current series. So unless there is a good reason > I might take this one through the nand tree. This patch indeed doesn't belong into this series. It just happend to be in my tree and shuffled into the middle when I sorted the patches by subsystem. Note I already sent it separately at https://lore.kernel.org/linux-mtd/20240115141245.3415035-2-u.kleine-koenig@pengutronix.de > Also, what about a Fixes/Cc: stable tag here? The problem exists since 3ab8f2a2e701 ("P4080/eLBC: Make Freescale elbc interrupt common to elbc devices") which was included in v2.6.37-rc1. At that time there was no EPROBE_DEFER yet. I think I wouldn't add a Fixes: line for that, but feel free to add one if you think there should be one. Best regards Uwe
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;
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(-)