diff --git a/drivers/uwb/qm35/qm35-spi.c b/drivers/uwb/qm35/qm35-spi.c index e8bf1235c930..f01de2488d91 100644 --- a/drivers/uwb/qm35/qm35-spi.c +++ b/drivers/uwb/qm35/qm35-spi.c @@ -47,6 +47,7 @@ #include #endif +#include #include #include #include @@ -1008,6 +1009,13 @@ static int qm35_probe(struct spi_device *spi) struct clk *uwb_clk; int ret = 0; + if (spi->dev.of_node && !mmi_device_is_available(spi->dev.of_node)) { + pr_err("%s : mmi: device not supported\n", __func__); + return -ENODEV; + } else { + pr_err("%s : supported uwb device found\n", __func__); + } + if (fwname) { qmrom_set_fwname(fwname); }