diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2017-02-11 15:34:15 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-02-19 14:57:16 +0300 |
commit | ed165e91719b2c99336786d721d8ae30700c62cb (patch) | |
tree | 1a70e2d71d3a93f3e499e7916934aea9150141d9 /drivers/iio/counter | |
parent | c5c7d1f34c333d0a14f1f80d3d46eed4f338211e (diff) | |
download | linux-ed165e91719b2c99336786d721d8ae30700c62cb.tar.xz |
iio: quad-8: 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/counter')
-rw-r--r-- | drivers/iio/counter/104-quad-8.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/counter/104-quad-8.c b/drivers/iio/counter/104-quad-8.c index a5913e97945e..e381ca66a92c 100644 --- a/drivers/iio/counter/104-quad-8.c +++ b/drivers/iio/counter/104-quad-8.c @@ -551,6 +551,7 @@ static int quad8_probe(struct device *dev, unsigned int id) indio_dev->num_channels = ARRAY_SIZE(quad8_channels); indio_dev->channels = quad8_channels; indio_dev->name = dev_name(dev); + indio_dev->dev.parent = dev; priv = iio_priv(indio_dev); priv->base = base[id]; |