From: Matt Ranostay <mranos...@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 <mranos...@gmail.com>
Acked-by: Daniel Baluta <daniel.bal...@intel.com>
Signed-off-by: Jonathan Cameron <ji...@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.

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to