diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2017-02-11 13:34:16 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-02-19 11:58:19 +0000 |
commit | 83535359c4302cb0f928eb931b7b1bc0a21a66c5 (patch) | |
tree | 08e4006fb024bf55b99ddc7e0d90b5b69e7026a3 /drivers/iio/dac | |
parent | ed165e91719b2c99336786d721d8ae30700c62cb (diff) |
iio: cio-dac: 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/dac')
-rw-r--r-- | drivers/iio/dac/cio-dac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/dac/cio-dac.c b/drivers/iio/dac/cio-dac.c index 5a743e2a779d..a0464227a3a0 100644 --- a/drivers/iio/dac/cio-dac.c +++ b/drivers/iio/dac/cio-dac.c @@ -119,6 +119,7 @@ static int cio_dac_probe(struct device *dev, unsigned int id) indio_dev->channels = cio_dac_channels; indio_dev->num_channels = CIO_DAC_NUM_CHAN; indio_dev->name = dev_name(dev); + indio_dev->dev.parent = dev; priv = iio_priv(indio_dev); priv->base = base[id]; |