From: Wei Yongjun <[email protected]>

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 panel-innolux-ej030na has no spi_device_id for innolux,ej030na

Add spi_device_id entries to silence the warning, and ensure driver
module autoloading works.

Signed-off-by: Wei Yongjun <[email protected]>
---
 drivers/gpu/drm/panel/panel-innolux-ej030na.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-innolux-ej030na.c 
b/drivers/gpu/drm/panel/panel-innolux-ej030na.c
index b2b0ebc9e943..331735bb2b4c 100644
--- a/drivers/gpu/drm/panel/panel-innolux-ej030na.c
+++ b/drivers/gpu/drm/panel/panel-innolux-ej030na.c
@@ -293,6 +293,12 @@ static const struct of_device_id ej030na_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ej030na_of_match);
 
+static const struct spi_device_id ej030na_ids[] = {
+       { "ej030na" },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(spi, ej030na_ids);
+
 static struct spi_driver ej030na_driver = {
        .driver = {
                .name = "panel-innolux-ej030na",
@@ -300,6 +306,7 @@ static struct spi_driver ej030na_driver = {
        },
        .probe = ej030na_probe,
        .remove = ej030na_remove,
+       .id_table = ej030na_ids,
 };
 module_spi_driver(ej030na_driver);
 
-- 
2.34.1

Reply via email to