[PATCH v2 04/10] drm/panel: novatek, nt39016: Silence no spi_device_id warning
Wei Yongjun
weiyongjun at huaweicloud.com
Thu Sep 22 14:11:57 UTC 2022
From: Wei Yongjun <weiyongjun1 at huawei.com>
SPI devices use the spi_device_id for module autoloading even on
systems using device tree, after commit 5fa6863ba692 ("spi: Check
we have a spi_device_id for each DT compatible"), kernel warns as
follows since the spi_device_id is missing:
SPI driver nt39016 has no spi_device_id for kingdisplay,kd035g6-54nt
Add spi_device_id entries to silence the warning, and ensure driver
module autoloading works.
Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>
---
drivers/gpu/drm/panel/panel-novatek-nt39016.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt39016.c b/drivers/gpu/drm/panel/panel-novatek-nt39016.c
index f58cfb10b58a..88a892b103e6 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt39016.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt39016.c
@@ -344,6 +344,12 @@ static const struct of_device_id nt39016_of_match[] = {
};
MODULE_DEVICE_TABLE(of, nt39016_of_match);
+static const struct spi_device_id nt39016_ids[] = {
+ { "kd035g6-54nt" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(spi, nt39016_ids);
+
static struct spi_driver nt39016_driver = {
.driver = {
.name = "nt39016",
@@ -351,6 +357,7 @@ static struct spi_driver nt39016_driver = {
},
.probe = nt39016_probe,
.remove = nt39016_remove,
+ .id_table = nt39016_ids,
};
module_spi_driver(nt39016_driver);
--
2.34.1
More information about the dri-devel
mailing list