[linux-yocto] [PATCH 4/5] iio: adc: ti-ads1015: add indio_dev->dev.of_node reference

tuomas.katila at intel.com tuomas.katila at intel.com
Mon Dec 12 05:58:17 PST 2016


From: Matt Ranostay <mranostay at gmail.com>

Backported from linux-yocto-4.8: f5241dbdfef4404b4e80f0bda13e5c7ceba3ee4a

Add the pointer to the device tree node of the ADC so that iio
consumers can reference the respective channels.

Signed-off-by: Matt Ranostay <mranostay at gmail.com>
Acked-by: Daniel Baluta <daniel.baluta at intel.com>
Signed-off-by: Jonathan Cameron <jic23 at kernel.org>
---
 drivers/iio/adc/ti-ads1015.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
index 8be192a84893..6f75a4aa67c1 100644
--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -585,6 +585,7 @@ static int ads1015_probe(struct i2c_client *client,
 	mutex_init(&data->lock);
 
 	indio_dev->dev.parent = &client->dev;
+	indio_dev->dev.of_node = client->dev.of_node;
 	indio_dev->name = ADS1015_DRV_NAME;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
-- 
2.11.0

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the linux-yocto mailing list