Skip to content

Commit eb6c650

Browse files
Uwe Kleine-Königbroonie
authored andcommitted
spi: Provide defer reason if getting irq during probe fails
Using dev_err_probe() in spi_probe() improves the kernel output from spi spi0.0: deferred probe pending: (reason unknown) to spi spi0.0: deferred probe pending: ad7124: Failed to get irq... for my current quest to make a certain spi device work. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4685457 commit eb6c650

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static int spi_probe(struct device *dev)
419419
if (dev->of_node) {
420420
spi->irq = of_irq_get(dev->of_node, 0);
421421
if (spi->irq == -EPROBE_DEFER)
422-
return -EPROBE_DEFER;
422+
return dev_err_probe(dev, -EPROBE_DEFER, "Failed to get irq\n");
423423
if (spi->irq < 0)
424424
spi->irq = 0;
425425
}

0 commit comments

Comments
 (0)