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.7-rc4~6^2~3^2~1 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=590b92a30242dd3f73de3d9a51d9924f1ab33e93;p=linux.git 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: Yong Li Reviewed-By: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index b4dbb3912977..651d57b8abbf 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -1011,6 +1011,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;