lkml.org 
[lkml]   [2013]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] drivers: misc: ti_dac7512: provide a SPI ID table
Date
This way, the module can be autoloaded by the SPI core.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
drivers/misc/ti_dac7512.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c
index 46dfbf3..6393a68 100644
--- a/drivers/misc/ti_dac7512.c
+++ b/drivers/misc/ti_dac7512.c
@@ -72,6 +72,12 @@ static int dac7512_remove(struct spi_device *spi)
return 0;
}

+static const struct spi_device_id dac7512_id_table[] = {
+ { "dac7512", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(spi, dac7512_id_table);
+
static struct spi_driver dac7512_driver = {
.driver = {
.name = "dac7512",
@@ -79,6 +85,7 @@ static struct spi_driver dac7512_driver = {
},
.probe = dac7512_probe,
.remove = dac7512_remove,
+ .id_table = dac7512_id_table,
};

module_spi_driver(dac7512_driver);
--
1.8.3.1


\
 
 \ /
  Last update: 2013-09-22 22:01    [W:0.082 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site