aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/spi/spidev.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-10-21 17:00:14 +0100
committerMark Brown <broonie@kernel.org>2018-10-21 17:00:14 +0100
commit4b51c747e4a52175e63d125db8365b38b06f0343 (patch)
treecd03133d8efbf5a039c7cb369aa7eaa8c27d8ebe /drivers/spi/spidev.c
parentMerge branch 'spi-4.19' into spi-linus (diff)
parentspi: lpspi: add imx8qxp compatible string (diff)
downloadwireguard-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.c9
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);