Commit 74e2419b authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

iio: maxim_thermocouple: Set parent device

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent b2027d16
...@@ -231,6 +231,7 @@ static int maxim_thermocouple_probe(struct spi_device *spi) ...@@ -231,6 +231,7 @@ static int maxim_thermocouple_probe(struct spi_device *spi)
indio_dev->available_scan_masks = chip->scan_masks; indio_dev->available_scan_masks = chip->scan_masks;
indio_dev->num_channels = chip->num_channels; indio_dev->num_channels = chip->num_channels;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->dev.parent = &spi->dev;
data = iio_priv(indio_dev); data = iio_priv(indio_dev);
data->spi = spi; data->spi = spi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment