[PATCH] Input: ads7846 - silent spi_device_id warnings

From: Sean Nyekjaer
Date: Wed Nov 01 2023 - 11:09:48 EST


Add spi_device_id entries to silent following warnings:
SPI driver ads7846 has no spi_device_id for ti,tsc2046
SPI driver ads7846 has no spi_device_id for ti,ads7843
SPI driver ads7846 has no spi_device_id for ti,ads7845
SPI driver ads7846 has no spi_device_id for ti,ads7873

Signed-off-by: Sean Nyekjaer <sean@xxxxxxxxxx>
---
drivers/input/touchscreen/ads7846.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index d2bbb436a77d..30758fc0e029 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1377,6 +1377,16 @@ static void ads7846_remove(struct spi_device *spi)
ads7846_stop(ts);
}

+static const struct spi_device_id ads7846_spi_ids[] = {
+ { "tsc2046" },
+ { "ads7843" },
+ { "ads7845" },
+ { "ads7846" },
+ { "ads7873" },
+ { },
+};
+MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
+
static struct spi_driver ads7846_driver = {
.driver = {
.name = "ads7846",
@@ -1384,6 +1394,7 @@ static struct spi_driver ads7846_driver = {
.pm = pm_sleep_ptr(&ads7846_pm),
.of_match_table = ads7846_dt_ids,
},
+ .id_table = ads7846_spi_ids,
.probe = ads7846_probe,
.remove = ads7846_remove,
};
--
2.42.0