lkml.org 
[lkml]   [2016]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] iio: light apds9960: Add the missing dev.parent
Reviewed-By: Matt Ranostay <mranostay@gmail.com>

On Thu, May 5, 2016 at 1:10 AM, Yong Li <sdliyong@gmail.com> wrote:
> Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039
>
> Signed-off-by: Yong Li <sdliyong@gmail.com>
> ---
> drivers/iio/light/apds9960.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
> index 35928fb..f47cc0a 100644
> --- a/drivers/iio/light/apds9960.c
> +++ b/drivers/iio/light/apds9960.c
> @@ -1010,6 +1010,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;
> --
> 2.5.0
>

\
 
 \ /
  Last update: 2016-05-05 10:41    [W:0.728 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site