Skip to contentSkip to conversation

staging:iio:adc:ad7280a: add of_match_table entry

PATCH New Kartik Kulkarni 1 participant 1 message Jul 25, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:iio:adc:ad7280a: add of_match_table entry

Add the of_device_id struct and the respective of_match_device entry to complete device tree support.

---
 drivers/staging/iio/adc/ad7280a.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/staging/iio/adc/ad7280a.c +7 -0
index 2d9c7551f314..ded0ba093a28 100644
@@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, ad7280_id);
 
+static const struct of_device_id ad7280_of_match[] = {
+	{ .compatible = "adi,ad7280a", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, ad7280_of_match);
+
 static struct spi_driver ad7280_driver = {
 	.driver = {
 		.name	= "ad7280a",
+		.of_match_table = ad7280_of_match,
 	},
 	.probe		= ad7280_probe,
 	.id_table	= ad7280_id,
Signature · 1 line
2.20.1