summaryrefslogtreecommitdiff
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2015-08-20 10:07:23 +0300
committerJonathan Cameron <jic23@kernel.org>2015-08-22 21:05:55 +0300
commit1c00dcd31d8e71670180ff938f05eb9aef49c84e (patch)
tree684c8f12ecfc9c4433258c51237c635e0c57a07d /drivers/iio/dac
parent9c68be3ecc74e1ccc085eab6f0cdbaff3093fba2 (diff)
downloadlinux-1c00dcd31d8e71670180ff938f05eb9aef49c84e.tar.xz
iio: dac: ad7303: Add OF match table
The Documentation/devicetree/bindings/iio/dac/ad7303.txt DT binding doc lists "adi,ad7303" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/ad7303.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c
index fa2810032968..18a4ad5ff8c5 100644
--- a/drivers/iio/dac/ad7303.c
+++ b/drivers/iio/dac/ad7303.c
@@ -281,6 +281,12 @@ static int ad7303_remove(struct spi_device *spi)
return 0;
}
+static const struct of_device_id ad7303_spi_of_match[] = {
+ { .compatible = "adi,ad7303", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, ad7303_spi_of_match);
+
static const struct spi_device_id ad7303_spi_ids[] = {
{ "ad7303", 0 },
{}
@@ -290,6 +296,7 @@ MODULE_DEVICE_TABLE(spi, ad7303_spi_ids);
static struct spi_driver ad7303_driver = {
.driver = {
.name = "ad7303",
+ .of_match_table = of_match_ptr(ad7303_spi_of_match),
.owner = THIS_MODULE,
},
.probe = ad7303_probe,