[RFC] spi: spidev: Allow direct references in DT from SPI slave controllers

SPI slave protocols are typically handled in userspace through spidev,
hence suppress the warning when the SPI controller is running in slave
mode.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 2e05046..d49aff1 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -751,7 +751,8 @@
 	 * compatible string, it is a Linux implementation thing
 	 * rather than a description of the hardware.
 	 */
-	if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
+	if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev) &&
+	    !(spi->master->flags & SPI_MASTER_IS_SLAVE)) {
 		dev_err(&spi->dev, "buggy DT: spidev listed directly in DT\n");
 		WARN_ON(spi->dev.of_node &&
 			!of_match_device(spidev_dt_ids, &spi->dev));