Commit 590b92a3 authored by Yong Li's avatar Yong Li Committed by Jonathan Cameron

iio: light apds9960: Add the missing dev.parent

Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039
Some userspace tools use this path to identify a specific instance of the
device.
Signed-off-by: default avatarYong Li <sdliyong@gmail.com>
Reviewed-By: default avatarMatt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 99543823
...@@ -1011,6 +1011,7 @@ static int apds9960_probe(struct i2c_client *client, ...@@ -1011,6 +1011,7 @@ static int apds9960_probe(struct i2c_client *client,
iio_device_attach_buffer(indio_dev, buffer); iio_device_attach_buffer(indio_dev, buffer);
indio_dev->dev.parent = &client->dev;
indio_dev->info = &apds9960_info; indio_dev->info = &apds9960_info;
indio_dev->name = APDS9960_DRV_NAME; indio_dev->name = APDS9960_DRV_NAME;
indio_dev->channels = apds9960_channels; indio_dev->channels = apds9960_channels;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment