build/patch/kernel/sunxi-legacy/general-spidev-remove-warnings.patch
Igor Pečovnik caa47bad65
Move sunxi/64 current to 5.7, legacy to 5.4 (#2098)
* Move sunxi/64 current to 5.7, legacy to 5.4
* Update sunxidev config
2020-07-18 23:08:52 +02:00

22 lines
811 B
Diff

diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index b0c76e262..c56f6dc4c 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -722,12 +722,12 @@ 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.
+ * compatible string, but people don't care and use DT overlays
+ * to activate SPIdev on demand
*/
- WARN(spi->dev.of_node &&
- of_device_is_compatible(spi->dev.of_node, "spidev"),
- "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
+ if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
+ dev_info(&spi->dev, "probing from DT");
+ }
spidev_probe_acpi(spi);