diff options
author | Matt Ranostay <mranostay@gmail.com> | 2016-07-02 20:26:33 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-07-03 08:40:08 -0400 |
commit | b541eaff4917a7429cd0e83cb3962383276db357 (patch) | |
tree | 30a37b1331d62e50beb29691e1bfdab50d901fbf | |
parent | f5241dbdfef4404b4e80f0bda13e5c7ceba3ee4a (diff) |
iio: adc: add missing of_node references to iio_dev
Adding missing indio_dev->dev.of_node references to allow iio consumers
to access the device channels.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/adc/ad7266.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7291.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7298.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7476.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7791.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7793.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7887.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7923.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad799x.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/hi8435.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ina2xx-adc.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/max1027.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/max1363.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/mcp320x.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/mcp3422.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/nau7802.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ti-adc081c.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ti-adc0832.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ti-adc128s052.c | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ti-ads8688.c | 1 |
20 files changed, 20 insertions, 0 deletions
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c index 01240aeeeab0..e527bb6f8f03 100644 --- a/drivers/iio/adc/ad7266.c +++ b/drivers/iio/adc/ad7266.c | |||
@@ -437,6 +437,7 @@ static int ad7266_probe(struct spi_device *spi) | |||
437 | st->spi = spi; | 437 | st->spi = spi; |
438 | 438 | ||
439 | indio_dev->dev.parent = &spi->dev; | 439 | indio_dev->dev.parent = &spi->dev; |
440 | indio_dev->dev.of_node = spi->dev.of_node; | ||
440 | indio_dev->name = spi_get_device_id(spi)->name; | 441 | indio_dev->name = spi_get_device_id(spi)->name; |
441 | indio_dev->modes = INDIO_DIRECT_MODE; | 442 | indio_dev->modes = INDIO_DIRECT_MODE; |
442 | indio_dev->info = &ad7266_info; | 443 | indio_dev->info = &ad7266_info; |
diff --git a/drivers/iio/adc/ad7291.c b/drivers/iio/adc/ad7291.c index 037630932749..1d90b02732bb 100644 --- a/drivers/iio/adc/ad7291.c +++ b/drivers/iio/adc/ad7291.c | |||
@@ -505,6 +505,7 @@ static int ad7291_probe(struct i2c_client *client, | |||
505 | indio_dev->num_channels = ARRAY_SIZE(ad7291_channels); | 505 | indio_dev->num_channels = ARRAY_SIZE(ad7291_channels); |
506 | 506 | ||
507 | indio_dev->dev.parent = &client->dev; | 507 | indio_dev->dev.parent = &client->dev; |
508 | indio_dev->dev.of_node = client->dev.of_node; | ||
508 | indio_dev->info = &ad7291_info; | 509 | indio_dev->info = &ad7291_info; |
509 | indio_dev->modes = INDIO_DIRECT_MODE; | 510 | indio_dev->modes = INDIO_DIRECT_MODE; |
510 | 511 | ||
diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c index 5dd0742da75a..10ec8fce395f 100644 --- a/drivers/iio/adc/ad7298.c +++ b/drivers/iio/adc/ad7298.c | |||
@@ -315,6 +315,7 @@ static int ad7298_probe(struct spi_device *spi) | |||
315 | 315 | ||
316 | indio_dev->name = spi_get_device_id(spi)->name; | 316 | indio_dev->name = spi_get_device_id(spi)->name; |
317 | indio_dev->dev.parent = &spi->dev; | 317 | indio_dev->dev.parent = &spi->dev; |
318 | indio_dev->dev.of_node = spi->dev.of_node; | ||
318 | indio_dev->modes = INDIO_DIRECT_MODE; | 319 | indio_dev->modes = INDIO_DIRECT_MODE; |
319 | indio_dev->channels = ad7298_channels; | 320 | indio_dev->channels = ad7298_channels; |
320 | indio_dev->num_channels = ARRAY_SIZE(ad7298_channels); | 321 | indio_dev->num_channels = ARRAY_SIZE(ad7298_channels); |
diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c index a819be288577..b7ecf9aab90f 100644 --- a/drivers/iio/adc/ad7476.c +++ b/drivers/iio/adc/ad7476.c | |||
@@ -227,6 +227,7 @@ static int ad7476_probe(struct spi_device *spi) | |||
227 | 227 | ||
228 | /* Establish that the iio_dev is a child of the spi device */ | 228 | /* Establish that the iio_dev is a child of the spi device */ |
229 | indio_dev->dev.parent = &spi->dev; | 229 | indio_dev->dev.parent = &spi->dev; |
230 | indio_dev->dev.of_node = spi->dev.of_node; | ||
230 | indio_dev->name = spi_get_device_id(spi)->name; | 231 | indio_dev->name = spi_get_device_id(spi)->name; |
231 | indio_dev->modes = INDIO_DIRECT_MODE; | 232 | indio_dev->modes = INDIO_DIRECT_MODE; |
232 | indio_dev->channels = st->chip_info->channel; | 233 | indio_dev->channels = st->chip_info->channel; |
diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c index 1dfe6410c64c..1817ebf5ad84 100644 --- a/drivers/iio/adc/ad7791.c +++ b/drivers/iio/adc/ad7791.c | |||
@@ -375,6 +375,7 @@ static int ad7791_probe(struct spi_device *spi) | |||
375 | spi_set_drvdata(spi, indio_dev); | 375 | spi_set_drvdata(spi, indio_dev); |
376 | 376 | ||
377 | indio_dev->dev.parent = &spi->dev; | 377 | indio_dev->dev.parent = &spi->dev; |
378 | indio_dev->dev.of_node = spi->dev.of_node; | ||
378 | indio_dev->name = spi_get_device_id(spi)->name; | 379 | indio_dev->name = spi_get_device_id(spi)->name; |
379 | indio_dev->modes = INDIO_DIRECT_MODE; | 380 | indio_dev->modes = INDIO_DIRECT_MODE; |
380 | indio_dev->channels = st->info->channels; | 381 | indio_dev->channels = st->info->channels; |
diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c index a43722fbf03a..847789bae821 100644 --- a/drivers/iio/adc/ad7793.c +++ b/drivers/iio/adc/ad7793.c | |||
@@ -784,6 +784,7 @@ static int ad7793_probe(struct spi_device *spi) | |||
784 | spi_set_drvdata(spi, indio_dev); | 784 | spi_set_drvdata(spi, indio_dev); |
785 | 785 | ||
786 | indio_dev->dev.parent = &spi->dev; | 786 | indio_dev->dev.parent = &spi->dev; |
787 | indio_dev->dev.of_node = spi->dev.of_node; | ||
787 | indio_dev->name = spi_get_device_id(spi)->name; | 788 | indio_dev->name = spi_get_device_id(spi)->name; |
788 | indio_dev->modes = INDIO_DIRECT_MODE; | 789 | indio_dev->modes = INDIO_DIRECT_MODE; |
789 | indio_dev->channels = st->chip_info->channels; | 790 | indio_dev->channels = st->chip_info->channels; |
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c index 1bc363b0a4c1..7a483bfbd70c 100644 --- a/drivers/iio/adc/ad7887.c +++ b/drivers/iio/adc/ad7887.c | |||
@@ -264,6 +264,7 @@ static int ad7887_probe(struct spi_device *spi) | |||
264 | 264 | ||
265 | /* Estabilish that the iio_dev is a child of the spi device */ | 265 | /* Estabilish that the iio_dev is a child of the spi device */ |
266 | indio_dev->dev.parent = &spi->dev; | 266 | indio_dev->dev.parent = &spi->dev; |
267 | indio_dev->dev.of_node = spi->dev.of_node; | ||
267 | indio_dev->name = spi_get_device_id(spi)->name; | 268 | indio_dev->name = spi_get_device_id(spi)->name; |
268 | indio_dev->info = &ad7887_info; | 269 | indio_dev->info = &ad7887_info; |
269 | indio_dev->modes = INDIO_DIRECT_MODE; | 270 | indio_dev->modes = INDIO_DIRECT_MODE; |
diff --git a/drivers/iio/adc/ad7923.c b/drivers/iio/adc/ad7923.c index 133711680e55..77a675e11ebb 100644 --- a/drivers/iio/adc/ad7923.c +++ b/drivers/iio/adc/ad7923.c | |||
@@ -288,6 +288,7 @@ static int ad7923_probe(struct spi_device *spi) | |||
288 | 288 | ||
289 | indio_dev->name = spi_get_device_id(spi)->name; | 289 | indio_dev->name = spi_get_device_id(spi)->name; |
290 | indio_dev->dev.parent = &spi->dev; | 290 | indio_dev->dev.parent = &spi->dev; |
291 | indio_dev->dev.of_node = spi->dev.of_node; | ||
291 | indio_dev->modes = INDIO_DIRECT_MODE; | 292 | indio_dev->modes = INDIO_DIRECT_MODE; |
292 | indio_dev->channels = info->channels; | 293 | indio_dev->channels = info->channels; |
293 | indio_dev->num_channels = info->num_channels; | 294 | indio_dev->num_channels = info->num_channels; |
diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c index 54284766d2ef..b6163764489c 100644 --- a/drivers/iio/adc/ad799x.c +++ b/drivers/iio/adc/ad799x.c | |||
@@ -806,6 +806,7 @@ static int ad799x_probe(struct i2c_client *client, | |||
806 | st->client = client; | 806 | st->client = client; |
807 | 807 | ||
808 | indio_dev->dev.parent = &client->dev; | 808 | indio_dev->dev.parent = &client->dev; |
809 | indio_dev->dev.of_node = client->dev.of_node; | ||
809 | indio_dev->name = id->name; | 810 | indio_dev->name = id->name; |
810 | indio_dev->info = st->chip_config->info; | 811 | indio_dev->info = st->chip_config->info; |
811 | 812 | ||
diff --git a/drivers/iio/adc/hi8435.c b/drivers/iio/adc/hi8435.c index c62bdb0a809e..678e8c7ea763 100644 --- a/drivers/iio/adc/hi8435.c +++ b/drivers/iio/adc/hi8435.c | |||
@@ -455,6 +455,7 @@ static int hi8435_probe(struct spi_device *spi) | |||
455 | mutex_init(&priv->lock); | 455 | mutex_init(&priv->lock); |
456 | 456 | ||
457 | idev->dev.parent = &spi->dev; | 457 | idev->dev.parent = &spi->dev; |
458 | idev->dev.of_node = spi->dev.of_node; | ||
458 | idev->name = spi_get_device_id(spi)->name; | 459 | idev->name = spi_get_device_id(spi)->name; |
459 | idev->modes = INDIO_DIRECT_MODE; | 460 | idev->modes = INDIO_DIRECT_MODE; |
460 | idev->info = &hi8435_info; | 461 | idev->info = &hi8435_info; |
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index b95ce5d7ee2c..955f3fdaf519 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c | |||
@@ -691,6 +691,7 @@ static int ina2xx_probe(struct i2c_client *client, | |||
691 | 691 | ||
692 | indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE; | 692 | indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE; |
693 | indio_dev->dev.parent = &client->dev; | 693 | indio_dev->dev.parent = &client->dev; |
694 | indio_dev->dev.of_node = client->dev.of_node; | ||
694 | indio_dev->channels = ina2xx_channels; | 695 | indio_dev->channels = ina2xx_channels; |
695 | indio_dev->num_channels = ARRAY_SIZE(ina2xx_channels); | 696 | indio_dev->num_channels = ARRAY_SIZE(ina2xx_channels); |
696 | indio_dev->name = id->name; | 697 | indio_dev->name = id->name; |
diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c index 41d495c6035e..712fbd2b1f16 100644 --- a/drivers/iio/adc/max1027.c +++ b/drivers/iio/adc/max1027.c | |||
@@ -426,6 +426,7 @@ static int max1027_probe(struct spi_device *spi) | |||
426 | 426 | ||
427 | indio_dev->name = spi_get_device_id(spi)->name; | 427 | indio_dev->name = spi_get_device_id(spi)->name; |
428 | indio_dev->dev.parent = &spi->dev; | 428 | indio_dev->dev.parent = &spi->dev; |
429 | indio_dev->dev.of_node = spi->dev.of_node; | ||
429 | indio_dev->info = &max1027_info; | 430 | indio_dev->info = &max1027_info; |
430 | indio_dev->modes = INDIO_DIRECT_MODE; | 431 | indio_dev->modes = INDIO_DIRECT_MODE; |
431 | indio_dev->channels = st->info->channels; | 432 | indio_dev->channels = st->info->channels; |
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index 3b53c2e3a891..841a13c9b6ea 100644 --- a/drivers/iio/adc/max1363.c +++ b/drivers/iio/adc/max1363.c | |||
@@ -1646,6 +1646,7 @@ static int max1363_probe(struct i2c_client *client, | |||
1646 | 1646 | ||
1647 | /* Establish that the iio_dev is a child of the i2c device */ | 1647 | /* Establish that the iio_dev is a child of the i2c device */ |
1648 | indio_dev->dev.parent = &client->dev; | 1648 | indio_dev->dev.parent = &client->dev; |
1649 | indio_dev->dev.of_node = client->dev.of_node; | ||
1649 | indio_dev->name = id->name; | 1650 | indio_dev->name = id->name; |
1650 | indio_dev->channels = st->chip_info->channels; | 1651 | indio_dev->channels = st->chip_info->channels; |
1651 | indio_dev->num_channels = st->chip_info->num_channels; | 1652 | indio_dev->num_channels = st->chip_info->num_channels; |
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c index a850ca7d1eda..634717ae12f3 100644 --- a/drivers/iio/adc/mcp320x.c +++ b/drivers/iio/adc/mcp320x.c | |||
@@ -308,6 +308,7 @@ static int mcp320x_probe(struct spi_device *spi) | |||
308 | adc->spi = spi; | 308 | adc->spi = spi; |
309 | 309 | ||
310 | indio_dev->dev.parent = &spi->dev; | 310 | indio_dev->dev.parent = &spi->dev; |
311 | indio_dev->dev.of_node = spi->dev.of_node; | ||
311 | indio_dev->name = spi_get_device_id(spi)->name; | 312 | indio_dev->name = spi_get_device_id(spi)->name; |
312 | indio_dev->modes = INDIO_DIRECT_MODE; | 313 | indio_dev->modes = INDIO_DIRECT_MODE; |
313 | indio_dev->info = &mcp320x_info; | 314 | indio_dev->info = &mcp320x_info; |
diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c index d1172dc1e8e2..254135e07792 100644 --- a/drivers/iio/adc/mcp3422.c +++ b/drivers/iio/adc/mcp3422.c | |||
@@ -352,6 +352,7 @@ static int mcp3422_probe(struct i2c_client *client, | |||
352 | mutex_init(&adc->lock); | 352 | mutex_init(&adc->lock); |
353 | 353 | ||
354 | indio_dev->dev.parent = &client->dev; | 354 | indio_dev->dev.parent = &client->dev; |
355 | indio_dev->dev.of_node = client->dev.of_node; | ||
355 | indio_dev->name = dev_name(&client->dev); | 356 | indio_dev->name = dev_name(&client->dev); |
356 | indio_dev->modes = INDIO_DIRECT_MODE; | 357 | indio_dev->modes = INDIO_DIRECT_MODE; |
357 | indio_dev->info = &mcp3422_info; | 358 | indio_dev->info = &mcp3422_info; |
diff --git a/drivers/iio/adc/nau7802.c b/drivers/iio/adc/nau7802.c index 57365c504093..db9b829ccf0d 100644 --- a/drivers/iio/adc/nau7802.c +++ b/drivers/iio/adc/nau7802.c | |||
@@ -433,6 +433,7 @@ static int nau7802_probe(struct i2c_client *client, | |||
433 | i2c_set_clientdata(client, indio_dev); | 433 | i2c_set_clientdata(client, indio_dev); |
434 | 434 | ||
435 | indio_dev->dev.parent = &client->dev; | 435 | indio_dev->dev.parent = &client->dev; |
436 | indio_dev->dev.of_node = client->dev.of_node; | ||
436 | indio_dev->name = dev_name(&client->dev); | 437 | indio_dev->name = dev_name(&client->dev); |
437 | indio_dev->modes = INDIO_DIRECT_MODE; | 438 | indio_dev->modes = INDIO_DIRECT_MODE; |
438 | indio_dev->info = &nau7802_info; | 439 | indio_dev->info = &nau7802_info; |
diff --git a/drivers/iio/adc/ti-adc081c.c b/drivers/iio/adc/ti-adc081c.c index 283d2a12b6da..319172cf7da8 100644 --- a/drivers/iio/adc/ti-adc081c.c +++ b/drivers/iio/adc/ti-adc081c.c | |||
@@ -186,6 +186,7 @@ static int adc081c_probe(struct i2c_client *client, | |||
186 | return err; | 186 | return err; |
187 | 187 | ||
188 | iio->dev.parent = &client->dev; | 188 | iio->dev.parent = &client->dev; |
189 | iio->dev.of_node = client->dev.of_node; | ||
189 | iio->name = dev_name(&client->dev); | 190 | iio->name = dev_name(&client->dev); |
190 | iio->modes = INDIO_DIRECT_MODE; | 191 | iio->modes = INDIO_DIRECT_MODE; |
191 | iio->info = &adc081c_info; | 192 | iio->info = &adc081c_info; |
diff --git a/drivers/iio/adc/ti-adc0832.c b/drivers/iio/adc/ti-adc0832.c index 0afeac0c9bad..f4ba23effe9a 100644 --- a/drivers/iio/adc/ti-adc0832.c +++ b/drivers/iio/adc/ti-adc0832.c | |||
@@ -194,6 +194,7 @@ static int adc0832_probe(struct spi_device *spi) | |||
194 | 194 | ||
195 | indio_dev->name = spi_get_device_id(spi)->name; | 195 | indio_dev->name = spi_get_device_id(spi)->name; |
196 | indio_dev->dev.parent = &spi->dev; | 196 | indio_dev->dev.parent = &spi->dev; |
197 | indio_dev->dev.of_node = spi->dev.of_node; | ||
197 | indio_dev->info = &adc0832_info; | 198 | indio_dev->info = &adc0832_info; |
198 | indio_dev->modes = INDIO_DIRECT_MODE; | 199 | indio_dev->modes = INDIO_DIRECT_MODE; |
199 | 200 | ||
diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c index bc58867d6e8d..89dfbd31be5c 100644 --- a/drivers/iio/adc/ti-adc128s052.c +++ b/drivers/iio/adc/ti-adc128s052.c | |||
@@ -150,6 +150,7 @@ static int adc128_probe(struct spi_device *spi) | |||
150 | spi_set_drvdata(spi, indio_dev); | 150 | spi_set_drvdata(spi, indio_dev); |
151 | 151 | ||
152 | indio_dev->dev.parent = &spi->dev; | 152 | indio_dev->dev.parent = &spi->dev; |
153 | indio_dev->dev.of_node = spi->dev.of_node; | ||
153 | indio_dev->name = spi_get_device_id(spi)->name; | 154 | indio_dev->name = spi_get_device_id(spi)->name; |
154 | indio_dev->modes = INDIO_DIRECT_MODE; | 155 | indio_dev->modes = INDIO_DIRECT_MODE; |
155 | indio_dev->info = &adc128_info; | 156 | indio_dev->info = &adc128_info; |
diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index 03e907028cb6..c400439900af 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c | |||
@@ -421,6 +421,7 @@ static int ads8688_probe(struct spi_device *spi) | |||
421 | 421 | ||
422 | indio_dev->name = spi_get_device_id(spi)->name; | 422 | indio_dev->name = spi_get_device_id(spi)->name; |
423 | indio_dev->dev.parent = &spi->dev; | 423 | indio_dev->dev.parent = &spi->dev; |
424 | indio_dev->dev.of_node = spi->dev.of_node; | ||
424 | indio_dev->modes = INDIO_DIRECT_MODE; | 425 | indio_dev->modes = INDIO_DIRECT_MODE; |
425 | indio_dev->channels = st->chip_info->channels; | 426 | indio_dev->channels = st->chip_info->channels; |
426 | indio_dev->num_channels = st->chip_info->num_channels; | 427 | indio_dev->num_channels = st->chip_info->num_channels; |