From: Yong Li Date: Thu, 5 May 2016 08:10:49 +0000 (+0800) Subject: iio: light apds9960: Add the missing dev.parent X-Git-Tag: firefly_0821_release~176^2~4^2~37^2~48 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c3aeba867d5fca069cf779a6ee487f50dd4d17ee;p=firefly-linux-kernel-4.4.55.git iio: light apds9960: Add the missing dev.parent commit 590b92a30242dd3f73de3d9a51d9924f1ab33e93 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 Reviewed-By: Matt Ranostay Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index f6a07dc32ae4..4a6d9670e4cd 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -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;