On Tue, 3 Jun 2008 11:41:38 -0700
Brandon Philips <brandon@xxxxxxxx> wrote:
> On 16:15 Mon 26 May 2008, Patch from Marcin Slusarz wrote:
> > From: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
> > check_v4l2 should return -EINVAL on error
> >
> > check_v4l2 always returns 0, so this change is an noop for now,
> > but a comment says it will return something else in the future
>
> Can I send a patch to remove check_v4l2 entirely since it is a noop?
> Once bttv is fixed we can add the checks back. Fixing up noop code
> wastes peoples time meanwhile :D
bttv doesn't need this anymore. The V4L1 calls will never arise to any I2C devices.
The only driver that still need V4L1 at I2C helper drivers, AFAIK, is zoran driver.
I think the better would be to port zoran to V4L2, and do a major cleanup at the drivers.
I've did a changeset converting zoran to V4L2, but it didn't work (image got
black - probably, I did some error while converting saa7110 module to V4L2).
Unfortunately, I didn't have time to check the issue and send again to someone
test it (I don't have any zoran hardware).
> Also, check_v4l2 is a difficult name to understand. Until I dug up the
> comment I didn't know what it was intended to check. It would be better
> to call it tuner_using_v4l2 or something to match t->using_v4l2.
It were intended to test if the user were with a V4L1 or V4L2 app.
>
> Cheers,
>
> Brandon
>
>
> >
> > Signed-off-by: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
> >
> >
> > ---
> >
> > linux/drivers/media/video/tuner-core.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff -r 07d5a1056ed3 -r f405b4a6b8b0 linux/drivers/media/video/tuner-core.c
> > --- a/linux/drivers/media/video/tuner-core.c Mon May 26 11:03:02 2008 -0300
> > +++ b/linux/drivers/media/video/tuner-core.c Sun May 11 19:58:59 2008 +0000
> > @@ -837,7 +837,7 @@ static int tuner_command(struct i2c_clie
> > case VIDIOCSAUDIO:
> > if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL)
> > return 0;
> > - if (check_v4l2(t) == EINVAL)
> > + if (check_v4l2(t) == -EINVAL)
> > return 0;
> >
> > /* Should be implemented, since bttv calls it */
> > @@ -855,7 +855,7 @@ static int tuner_command(struct i2c_clie
> > };
> > struct video_channel *vc = arg;
> >
> > - if (check_v4l2(t) == EINVAL)
> > + if (check_v4l2(t) == -EINVAL)
> > return 0;
> >
> > if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL)
> > @@ -874,7 +874,7 @@ static int tuner_command(struct i2c_clie
> >
> > if (check_mode(t, "VIDIOCSFREQ") == -EINVAL)
> > return 0;
> > - if (check_v4l2(t) == EINVAL)
> > + if (check_v4l2(t) == -EINVAL)
> > return 0;
> >
> > set_freq(client, *v);
> > @@ -886,7 +886,7 @@ static int tuner_command(struct i2c_clie
> >
> > if (check_mode(t, "VIDIOCGTUNER") == -EINVAL)
> > return 0;
> > - if (check_v4l2(t) == EINVAL)
> > + if (check_v4l2(t) == -EINVAL)
> > return 0;
> >
> > if (V4L2_TUNER_RADIO == t->mode) {
> > @@ -930,7 +930,7 @@ static int tuner_command(struct i2c_clie
> >
> > if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL)
> > return 0;
> > - if (check_v4l2(t) == EINVAL)
> > + if (check_v4l2(t) == -EINVAL)
> > return 0;
> >
> > if (V4L2_TUNER_RADIO == t->mode) {
> >
>
> _______________________________________________
> v4l-dvb-maintainer mailing list
> v4l-dvb-maintainer@xxxxxxxxxxx
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer
Cheers,
Mauro
_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer
[Linux Media]
[Older V4L]
[Linux DVB]
[Video Disk Recorder]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Xorg]
[Util Linux NG]
[Xfree86]
[Free Photo Albums]
[Fedora Users]
[Fedora Women]
[ALSA Users]
[ALSA Devel]
[SSH]
[Linux USB]
 |
 |
-->