summaryrefslogtreecommitdiff
path: root/drivers/iio/temperature
diff options
context:
space:
mode:
authorAndrea Merello <andrea.merello@gmail.com>2019-09-09 14:58:17 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-09-15 13:26:06 +0100
commit505ea3ada665c466d0064b11b6e611b7f995517d (patch)
treed311fe6da9abd74fabbdd0a97bcfc24686b3cbe8 /drivers/iio/temperature
parent22ea565110731e48d9434d029df4f62c94df0a89 (diff)
iio: max31856: add missing of_node and parent references to iio_dev
Adding missing indio_dev->dev.of_node references so that, in case multiple max31856 are present, users can get some clues to being able to distinguish each of them. While at it, add also the missing parent reference. Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/temperature')
-rw-r--r--drivers/iio/temperature/max31856.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/temperature/max31856.c b/drivers/iio/temperature/max31856.c
index f184ba5601d9..73ed550e3fc9 100644
--- a/drivers/iio/temperature/max31856.c
+++ b/drivers/iio/temperature/max31856.c
@@ -284,6 +284,8 @@ static int max31856_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev);
indio_dev->info = &max31856_info;
+ indio_dev->dev.parent = &spi->dev;
+ indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = id->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = max31856_channels;