linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	LMML <linux-media@vger.kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	DLOS <davinci-linux-open-source@linux.davincidsp.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH] media: i2c: adv7343: add support for asynchronous probing
Date: Sun, 23 Jun 2013 15:30:00 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1306231527050.13783@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.1306231525060.13783@axis700.grange>

On Sun, 23 Jun 2013, Guennadi Liakhovetski wrote:

> On Sat, 22 Jun 2013, Prabhakar Lad wrote:
> 
> > From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> > 
> > Both synchronous and asynchronous adv7343 subdevice probing is supported by
> > this patch.
> > 
> > Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Hans Verkuil <hverkuil@xs4all.nl>
> > Cc: Sakari Ailus <sakari.ailus@iki.fi>
> > Cc: Mauro Carvalho Chehab <mchehab@redhat.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.

Uhm, sorry, shouldn't review patches after that kind of a weekend :)

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Guennadi

> 
> >  	}
> >  	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/
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

      reply	other threads:[~2013-06-23 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22 10:07 [PATCH] media: i2c: adv7343: add support for asynchronous probing Prabhakar Lad
2013-06-23 13:26 ` Guennadi Liakhovetski
2013-06-23 13:30   ` Guennadi Liakhovetski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1306231527050.13783@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).