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: v4.6.5~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43c1f4698602e3440968fc8df71d1ff4e69e33fe;p=thirdparty%2Fkernel%2Fstable.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 a6af56ad10e1d..6443aad809b24 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -1006,6 +1006,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;