Skip to contentSkip to conversation

iio: max31856: add missing of_node and parent references to iio_dev

PATCH In review Andrea Merello 2 participants 2 messages Sep 9, 2019 – Sep 15, 2019 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/iio/temperature/max31856.c +2 -0
index f184ba5601d9..73ed550e3fc9 100644
@@ -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;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 5 lines · On Mon, 9 Sep 2019 14:58:17 +0200 Andrea Merello <[email protected]>…

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.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 14 lines
drivers/iio/temperature/max31856.c +2 -0
index f184ba5601d9..73ed550e3fc9 100644
@@ -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;