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 ws2401-panel has no spi_device_id for samsung,lms380kf01

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-widechips-ws2401.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-widechips-ws2401.c 
b/drivers/gpu/drm/panel/panel-widechips-ws2401.c
index 236f3cb2b594..436ba96befb7 100644
--- a/drivers/gpu/drm/panel/panel-widechips-ws2401.c
+++ b/drivers/gpu/drm/panel/panel-widechips-ws2401.c
@@ -425,9 +425,16 @@ static const struct of_device_id ws2401_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ws2401_match);
 
+static const struct spi_device_id ws2401_ids[] = {
+       { "lms380kf01" },
+       {},
+};
+MODULE_DEVICE_TABLE(spi, ws2401_ids);
+
 static struct spi_driver ws2401_driver = {
        .probe          = ws2401_probe,
        .remove         = ws2401_remove,
+       .id_table       = ws2401_ids,
        .driver         = {
                .name   = "ws2401-panel",
                .of_match_table = ws2401_match,
-- 
2.34.1

Reply via email to