From: Lars-Peter Clausen Date: Sat, 11 Feb 2017 12:34:16 +0000 (+0100) Subject: iio: cio-dac: Set parent device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=83535359c4302cb0f928eb931b7b1bc0a21a66c5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: William Breathitt Gray Signed-off-by: Jonathan Cameron --- 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];