summaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2017-02-11 13:34:14 +0100
committerJonathan Cameron <jic23@kernel.org>2017-02-19 11:53:05 +0000
commitc5c7d1f34c333d0a14f1f80d3d46eed4f338211e (patch)
tree99056065f18175e4de722bed22e181a5f842193a /drivers/iio/adc
parent31b9f91913cb18d7eb2276640bf0a56fb352d7b6 (diff)
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>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/stx104.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/stx104.c b/drivers/iio/adc/stx104.c
index be2de48844bc..2df84fa5e3fc 100644
--- a/drivers/iio/adc/stx104.c
+++ b/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];