mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
iio: light apds9960: Add the missing dev.parent
commit 590b92a302 upstream.
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: Yong Li <sdliyong@gmail.com>
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
923f209551
commit
c3aeba867d
@@ -1005,6 +1005,7 @@ static int apds9960_probe(struct i2c_client *client,
|
||||
|
||||
iio_device_attach_buffer(indio_dev, buffer);
|
||||
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->info = &apds9960_info;
|
||||
indio_dev->name = APDS9960_DRV_NAME;
|
||||
indio_dev->channels = apds9960_channels;
|
||||
|
||||
Reference in New Issue
Block a user