From: Lars-Peter Clausen Date: Sat, 11 Feb 2017 12:34:19 +0000 (+0100) Subject: iio: lmp91000: Set parent device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e78c1f5710bc1a394d17850a50de0429aa5e2938;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: lmp91000: 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 Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index e22714365022..afa8de3418d0 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -325,6 +325,7 @@ static int lmp91000_probe(struct i2c_client *client, indio_dev->channels = lmp91000_channels; indio_dev->num_channels = ARRAY_SIZE(lmp91000_channels); indio_dev->name = LMP91000_DRV_NAME; + indio_dev->dev.parent = &client->dev; indio_dev->modes = INDIO_DIRECT_MODE; i2c_set_clientdata(client, indio_dev);