The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] spi: dw: Add deferred controller registration support
@ 2022-08-22 18:18 Serge Semin
  2022-08-22 21:38 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Serge Semin @ 2022-08-22 18:18 UTC (permalink / raw)
  To: Serge Semin, Mark Brown
  Cc: Serge Semin, Alexey Malahov, Pavel Parkhomenko, Andy Shevchenko,
	Andy Shevchenko, linux-spi, linux-kernel

It's pretty possible to have the spi_register_controller() method
returning -EPROBE_DEFER status in case, for instance, if the GPIOs used
for the CS implementation aren't ready to be requested due to the
corresponding platform devices still pending to be probed. Let's make sure
the DW SSI driver won't print error message in that case by calling the
dev_err_probe() function if the SPI-registration procedure exited with
a non-zero status.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
---
 drivers/spi/spi-dw-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
index f87d97ccd2d6..99edddf9958b 100644
--- a/drivers/spi/spi-dw-core.c
+++ b/drivers/spi/spi-dw-core.c
@@ -955,7 +955,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 
 	ret = spi_register_controller(master);
 	if (ret) {
-		dev_err(&master->dev, "problem registering spi master\n");
+		dev_err_probe(dev, ret, "problem registering spi master\n");
 		goto err_dma_exit;
 	}
 
-- 
2.35.1


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

end of thread, other threads:[~2022-08-23 20:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22 18:18 [PATCH] spi: dw: Add deferred controller registration support Serge Semin
2022-08-22 21:38 ` Andy Shevchenko
2022-08-22 22:01   ` Serge Semin
2022-08-23 12:06 ` Mark Brown
2022-08-23 20:30   ` Serge Semin
2022-08-23 17:00 ` Mark Brown

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