summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@kernel.org>2024-10-04 11:42:32 +0200
committerMark Brown <broonie@kernel.org>2024-10-04 13:04:05 +0100
commiteb6c65049a274c37f9b6fdf632843b609a0b8fa8 (patch)
tree61ba257bb0763c626b1b293362c0dea488308cc6 /drivers/spi
parent46854574fd76c711c890423f8ac60df4fb726559 (diff)
downloadlinux-eb6c65049a274c37f9b6fdf632843b609a0b8fa8.tar.gz
linux-eb6c65049a274c37f9b6fdf632843b609a0b8fa8.tar.bz2
linux-eb6c65049a274c37f9b6fdf632843b609a0b8fa8.zip
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 <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20241004094234.268301-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 073ffae97767..7c5e76b15421 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -419,7 +419,7 @@ static int spi_probe(struct device *dev)
if (dev->of_node) {
spi->irq = of_irq_get(dev->of_node, 0);
if (spi->irq == -EPROBE_DEFER)
- return -EPROBE_DEFER;
+ return dev_err_probe(dev, -EPROBE_DEFER, "Failed to get irq\n");
if (spi->irq < 0)
spi->irq = 0;
}