Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527523

[PATCH v8 7/8] drivers:input:ads7846(+tsc2046): fix spi module table

From "H. Nikolaus Schaller" <hns@goldelico.com>
Newsgroups linux.kernel
Subject [PATCH v8 7/8] drivers:input:ads7846(+tsc2046): fix spi module table
Date 2016-11-22 15:10 +0100
Message-ID <sGjVL-89K-3@gated-at.bofh.it> (permalink)
References <sGjVL-89K-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Fix module table so that the driver is loaded if compiled
as module and requested by DT.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/input/touchscreen/ads7846.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 400e421..50c85d2 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1532,6 +1532,16 @@ static int ads7846_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct spi_device_id ads7846_idtable[] = {
+	{ "tsc2046", 0 },
+	{ "ads7843", 0 },
+	{ "ads7845", 0 },
+	{ "ads7846", 0 },
+	{ "ads7873", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(spi, ads7846_idtable);
+
 static struct spi_driver ads7846_driver = {
 	.driver = {
 		.name	= "ads7846",
@@ -1546,4 +1556,3 @@ module_spi_driver(ads7846_driver);
 
 MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("spi:ads7846");
-- 
2.7.3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v8 7/8] drivers:input:ads7846(+tsc2046): fix spi module table "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-11-22 15:10 +0100

csiph-web