Ver código fonte

iio: stx104: 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>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen 8 anos atrás
pai
commit
c5c7d1f34c
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      drivers/iio/adc/stx104.c

+ 1 - 0
drivers/iio/adc/stx104.c

@@ -318,6 +318,7 @@ static int stx104_probe(struct device *dev, unsigned int id)
 	}
 
 	indio_dev->name = dev_name(dev);
+	indio_dev->dev.parent = dev;
 
 	priv = iio_priv(indio_dev);
 	priv->base = base[id];