diff options
author | Yong Li <sdliyong@gmail.com> | 2016-05-05 16:10:49 +0800 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-06-03 12:54:51 +0100 |
commit | 590b92a30242dd3f73de3d9a51d9924f1ab33e93 (patch) | |
tree | fb90c1dfb51c3dc4f73450ab53b6986f2d6b64a0 /drivers/iio/light | |
parent | 99543823357966ac938d9a310947e731b67338e6 (diff) |
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 <sdliyong@gmail.com>
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r-- | drivers/iio/light/apds9960.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |