]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iio: adc: ti-ads1015: add indio_dev->dev.of_node reference
authorMatt Ranostay <mranostay@gmail.com>
Fri, 1 Jul 2016 02:33:50 +0000 (19:33 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Jul 2016 12:12:46 +0000 (13:12 +0100)
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@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/ti-ads1015.c

index c9574af098821de44a5f9f737eb8661b1586fce9..1ef398770a1f2c2dcbc760f911b5064ea4950954 100644 (file)
@@ -586,6 +586,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;