Skip to content

Commit

Permalink
iio: maxim_thermocouple: Set parent device
Browse files Browse the repository at this point in the history
Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Feb 19, 2017
1 parent b2027d1 commit 74e2419
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/temperature/maxim_thermocouple.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ static int maxim_thermocouple_probe(struct spi_device *spi)
indio_dev->available_scan_masks = chip->scan_masks;
indio_dev->num_channels = chip->num_channels;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->dev.parent = &spi->dev;

data = iio_priv(indio_dev);
data->spi = spi;
Expand Down

0 comments on commit 74e2419

Please sign in to comment.