Skip to content

Commit 1c00dcd

Browse files
Javier Martinez Canillasjic23
authored andcommitted
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>
1 parent 9c68be3 commit 1c00dcd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/iio/dac/ad7303.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ static int ad7303_remove(struct spi_device *spi)
281281
return 0;
282282
}
283283

284+
static const struct of_device_id ad7303_spi_of_match[] = {
285+
{ .compatible = "adi,ad7303", },
286+
{ /* sentinel */ },
287+
};
288+
MODULE_DEVICE_TABLE(of, ad7303_spi_of_match);
289+
284290
static const struct spi_device_id ad7303_spi_ids[] = {
285291
{ "ad7303", 0 },
286292
{}
@@ -290,6 +296,7 @@ MODULE_DEVICE_TABLE(spi, ad7303_spi_ids);
290296
static struct spi_driver ad7303_driver = {
291297
.driver = {
292298
.name = "ad7303",
299+
.of_match_table = of_match_ptr(ad7303_spi_of_match),
293300
.owner = THIS_MODULE,
294301
},
295302
.probe = ad7303_probe,

0 commit comments

Comments
 (0)