950-0070-spi-spidev-Completely-disable-the-spidev-warning.patch 880 B

123456789101112131415161718192021222324
  1. From 389c8d3272050cd89a464779a47a575dee3e308b Mon Sep 17 00:00:00 2001
  2. From: Dom Cobley <[email protected]>
  3. Date: Mon, 24 Jan 2022 13:41:16 +0000
  4. Subject: [PATCH 0070/1085] spi: spidev: Completely disable the spidev warning
  5. An alternative strategy would be to use "rpi,spidev" instead, but that
  6. would require many Raspberry Pi Device Tree changes.
  7. Signed-off-by: Phil Elwell <[email protected]>
  8. ---
  9. drivers/spi/spidev.c | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. --- a/drivers/spi/spidev.c
  12. +++ b/drivers/spi/spidev.c
  13. @@ -720,7 +720,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
  14. */
  15. static int spidev_of_check(struct device *dev)
  16. {
  17. - if (device_property_match_string(dev, "compatible", "spidev") < 0)
  18. + if (1 || device_property_match_string(dev, "compatible", "spidev") < 0)
  19. return 0;
  20. dev_err(dev, "spidev listed directly in DT is not supported\n");