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:
parent
b2027d16df
commit
74e2419b00
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user