diff options
| author | 2018-10-21 17:00:14 +0100 | |
|---|---|---|
| committer | 2018-10-21 17:00:14 +0100 | |
| commit | 4b51c747e4a52175e63d125db8365b38b06f0343 (patch) | |
| tree | cd03133d8efbf5a039c7cb369aa7eaa8c27d8ebe /drivers/spi/spidev.c | |
| parent | Merge branch 'spi-4.19' into spi-linus (diff) | |
| parent | spi: lpspi: add imx8qxp compatible string (diff) | |
| download | wireguard-linux-4b51c747e4a52175e63d125db8365b38b06f0343.tar.xz wireguard-linux-4b51c747e4a52175e63d125db8365b38b06f0343.zip | |
Merge branch 'spi-4.20' into spi-next
Diffstat (limited to 'drivers/spi/spidev.c')
| -rw-r--r-- | drivers/spi/spidev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index cda10719d1d1..b0c76e2626ce 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -669,6 +669,7 @@ static const struct of_device_id spidev_dt_ids[] = { { .compatible = "lineartechnology,ltc2488" }, { .compatible = "ge,achc" }, { .compatible = "semtech,sx1301" }, + { .compatible = "lwn,bk4" }, {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); @@ -724,11 +725,9 @@ static int spidev_probe(struct spi_device *spi) * 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)) { - 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)); - } + 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); spidev_probe_acpi(spi); |
