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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Lars-Peter Clausen 2017-02-11 13:34:21 +01:00 коммит произвёл Jonathan Cameron
Родитель b2027d16df
Коммит 74e2419b00
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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;