Skip to contentSkip to conversation

iio: dac: ti-dac5571: provide of_match_table to driver

PATCH In review Marcus Folkesson 2 participants 2 messages Aug 24, 2018 – Aug 25, 2018 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: dac: ti-dac5571: provide of_match_table to driver

Use the created list of of_device_id's as a match table.

---
 drivers/iio/dac/ti-dac5571.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/dac/ti-dac5571.c +1 -0
index e39d1e901353..f6dcd8bce2b0 100644
@@ -421,6 +421,7 @@ MODULE_DEVICE_TABLE(i2c, dac5571_id);
 static struct i2c_driver dac5571_driver = {
 	.driver = {
 		   .name = "ti-dac5571",
+		   .of_match_table = of_match_ptr(dac5571_of_id),
 	},
 	.probe	  = dac5571_probe,
 	.remove   = dac5571_remove,
Signature · 1 line
2.18.0
maintainer
#1 lore raw
Quoted 3 lines · On Fri, 24 Aug 2018 22:24:59 +0200 Marcus Folkesson…

Use the created list of of_device_id's as a match table.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Technically this isn't a regression as it will fall back to the oldschool i2c matching (which hasn't gone away yet). Hence I don't plan to send it as a fix during the cycle.

Jonathan

Quoted 16 lines
---
 drivers/iio/dac/ti-dac5571.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/dac/ti-dac5571.c +1 -0
index e39d1e901353..f6dcd8bce2b0 100644
@@ -421,6 +421,7 @@ MODULE_DEVICE_TABLE(i2c, dac5571_id);
 static struct i2c_driver dac5571_driver = {
 	.driver = {
 		   .name = "ti-dac5571",
+		   .of_match_table = of_match_ptr(dac5571_of_id),
 	},
 	.probe	  = dac5571_probe,
 	.remove   = dac5571_remove,