From 2653defc5e22ba86bd1d455eb01fc7edd2958473 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Wed, 2 Feb 2022 11:56:51 +0300 Subject: [PATCH 08/50] drv:spi:spidev remove warnings --- drivers/spi/spidev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 1bd73e322..e1a8ae965 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -750,7 +750,13 @@ static int spidev_probe(struct spi_device *spi) * spidev should never be referenced in DT without a specific * compatible string, it is a Linux implementation thing * rather than a description of the hardware. + * But people don't care and use DT overlays to activate SPIdev + * on demand. */ + if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) { + dev_info(&spi->dev, "probing from DT"); + } + if (spi->dev.of_node && of_device_is_compatible(spi->dev.of_node, "spidev")) { dev_err(&spi->dev, "spidev listed directly in DT is not supported\n"); return -EINVAL; -- 2.34.1