[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1306231525060.13783@axis700.grange>
Date: Sun, 23 Jun 2013 15:26:10 +0200 (CEST)
From: Guennadi Liakhovetski <g.liakhovetski@....de>
To: Prabhakar Lad <prabhakar.csengg@...il.com>
cc: Mauro Carvalho Chehab <mchehab@...hat.com>,
LMML <linux-media@...r.kernel.org>,
Hans Verkuil <hans.verkuil@...co.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
DLOS <davinci-linux-open-source@...ux.davincidsp.com>,
LKML <linux-kernel@...r.kernel.org>,
Hans Verkuil <hverkuil@...all.nl>,
Sakari Ailus <sakari.ailus@....fi>
Subject: Re: [PATCH] media: i2c: adv7343: add support for asynchronous probing
On Sat, 22 Jun 2013, Prabhakar Lad wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
>
> Both synchronous and asynchronous adv7343 subdevice probing is supported by
> this patch.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
> Cc: Guennadi Liakhovetski <g.liakhovetski@....de>
> Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Cc: Hans Verkuil <hverkuil@...all.nl>
> Cc: Sakari Ailus <sakari.ailus@....fi>
> Cc: Mauro Carvalho Chehab <mchehab@...hat.com>
> ---
> drivers/media/i2c/adv7343.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c
> index 7606218..8080c2c 100644
> --- a/drivers/media/i2c/adv7343.c
> +++ b/drivers/media/i2c/adv7343.c
> @@ -27,6 +27,7 @@
> #include <linux/uaccess.h>
>
> #include <media/adv7343.h>
> +#include <media/v4l2-async.h>
> #include <media/v4l2-device.h>
> #include <media/v4l2-ctrls.h>
>
> @@ -445,16 +446,21 @@ static int adv7343_probe(struct i2c_client *client,
> ADV7343_GAIN_DEF);
> state->sd.ctrl_handler = &state->hdl;
> if (state->hdl.error) {
> - int err = state->hdl.error;
> -
> - v4l2_ctrl_handler_free(&state->hdl);
> - return err;
> + err = state->hdl.error;
> + goto done;
What does this have to do with asynchronous probing? Please, remove.
> }
> v4l2_ctrl_handler_setup(&state->hdl);
>
> err = adv7343_initialize(&state->sd);
> if (err)
> + goto done;
> +
> + err = v4l2_async_register_subdev(&state->sd);
> +
> +done:
This label won't be needed then either.
Thanks
Guennadi
> + if (err < 0)
> v4l2_ctrl_handler_free(&state->hdl);
> +
> return err;
> }
>
> @@ -463,6 +469,7 @@ static int adv7343_remove(struct i2c_client *client)
> struct v4l2_subdev *sd = i2c_get_clientdata(client);
> struct adv7343_state *state = to_state(sd);
>
> + v4l2_async_unregister_subdev(&state->sd);
> v4l2_device_unregister_subdev(sd);
> v4l2_ctrl_handler_free(&state->hdl);
>
> --
> 1.7.9.5
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists