aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-09-22 15:51:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 12:04:06 -0400
commitf91f9258f61f024d34b7c001f989acf8ee39378a (patch)
tree2e3ea12e5b20e59c824a7ed74a16083261a1f322 /drivers
parentbeb900fc2428fa812e4a49251ef8396fa46b77fc (diff)
drivers: misc: ti_dac7512: add support for DT matching
Only matching is done via DT, no other details can be passed. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/ti_dac7512.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c
index 6393a68122ae..83da711ce9f1 100644
--- a/drivers/misc/ti_dac7512.c
+++ b/drivers/misc/ti_dac7512.c
@@ -22,6 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/of.h>
25 26
26static ssize_t dac7512_store_val(struct device *dev, 27static ssize_t dac7512_store_val(struct device *dev,
27 struct device_attribute *attr, 28 struct device_attribute *attr,
@@ -78,10 +79,19 @@ static const struct spi_device_id dac7512_id_table[] = {
78}; 79};
79MODULE_DEVICE_TABLE(spi, dac7512_id_table); 80MODULE_DEVICE_TABLE(spi, dac7512_id_table);
80 81
82#ifdef CONFIG_OF
83static const struct of_device_id dac7512_of_match[] = {
84 { .compatible = "ti,dac7512", },
85 { }
86};
87MODULE_DEVICE_TABLE(of, dac7512_of_match);
88#endif
89
81static struct spi_driver dac7512_driver = { 90static struct spi_driver dac7512_driver = {
82 .driver = { 91 .driver = {
83 .name = "dac7512", 92 .name = "dac7512",
84 .owner = THIS_MODULE, 93 .owner = THIS_MODULE,
94 .of_match_table = of_match_ptr(dac7512_of_match),
85 }, 95 },
86 .probe = dac7512_probe, 96 .probe = dac7512_probe,
87 .remove = dac7512_remove, 97 .remove = dac7512_remove,