diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2017-02-11 13:34:20 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-02-19 13:02:31 +0100 |
commit | b2027d16df9194ec22eb5d315776532a7476bdb1 (patch) | |
tree | 9a06d02f1112ef7103d3d21c1c959dd49b53add8 /drivers/iio/proximity | |
parent | iio: lmp91000: Set parent device (diff) | |
download | linux-b2027d16df9194ec22eb5d315776532a7476bdb1.tar.xz linux-b2027d16df9194ec22eb5d315776532a7476bdb1.zip |
iio: pulsedlight-lidar-lite-v2: 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>
Diffstat (limited to 'drivers/iio/proximity')
-rw-r--r-- | drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c index 20c16a08c9d9..36c1ddc251aa 100644 --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c @@ -278,6 +278,7 @@ static int lidar_probe(struct i2c_client *client, indio_dev->name = LIDAR_DRV_NAME; indio_dev->channels = lidar_channels; indio_dev->num_channels = ARRAY_SIZE(lidar_channels); + indio_dev->dev.parent = &client->dev; indio_dev->modes = INDIO_DIRECT_MODE; i2c_set_clientdata(client, indio_dev); |