summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2017-02-11 15:34:19 +0300
committerJonathan Cameron <jic23@kernel.org>2017-02-19 15:01:52 +0300
commite78c1f5710bc1a394d17850a50de0429aa5e2938 (patch)
tree4f3c42ecd531380695c90c4a2e480dc61617fe80
parentfa722499bbf89b5976bdfc77139f7d623a69a18a (diff)
downloadlinux-e78c1f5710bc1a394d17850a50de0429aa5e2938.tar.xz
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 <lars@metafoo.de> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/potentiostat/lmp91000.c1
1 files changed, 1 insertions, 0 deletions
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);