summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYong Li <sdliyong@gmail.com>2016-05-05 16:10:49 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-27 08:42:20 -0700
commit43c1f4698602e3440968fc8df71d1ff4e69e33fe (patch)
tree6080c8b6611aa6009767a369ae39671f33639578 /drivers
parent1c94121fddb2e823898d743d1935a045c9ef3ca1 (diff)
downloadlinux-stable-43c1f4698602e3440968fc8df71d1ff4e69e33fe.tar.gz
linux-stable-43c1f4698602e3440968fc8df71d1ff4e69e33fe.tar.bz2
linux-stable-43c1f4698602e3440968fc8df71d1ff4e69e33fe.zip
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 <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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/light/apds9960.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index a6af56ad10e1..6443aad809b2 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;