|
|
|
RE: [PATCH] v4l/tvp514x: try_count reaches 0, not -1 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Thanks,
Vaibhav Hiremath
> -----Original Message-----
> From: Roel Kluin [mailto:roel.kluin@xxxxxxxxx]
> Sent: Tuesday, February 10, 2009 3:27 AM
> To: Hiremath, Vaibhav; mchehab@xxxxxxxxxx
> Cc: linux-media@xxxxxxxxxxxxxxx; video4linux-list@xxxxxxxxxx
> Subject: [PATCH] v4l/tvp514x: try_count reaches 0, not -1
>
> with while (try_count-- > 0) { ... } try_count reaches 0, not -1.
>
[Hiremath, Vaibhav] Please look at the loop,
while (try_count-- > 0) {
Wait till TVP locks the Signal.
}
if ((current_std == STD_INVALID) || (try_count < 0))
return -EINVAL;
The above loop fails to lock the signal, and then the value of try_count will be -1 and not 0. The values 0-4 indicates the signal has been locked, provided that current_std != STD_INVALID.
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> diff --git a/drivers/media/video/tvp514x.c
> b/drivers/media/video/tvp514x.c
> index 8e23aa5..5f4cbc2 100644
> --- a/drivers/media/video/tvp514x.c
> +++ b/drivers/media/video/tvp514x.c
> @@ -686,7 +686,7 @@ static int ioctl_s_routing(struct
> v4l2_int_device *s,
> break; /* Input detected */
> }
>
> - if ((current_std == STD_INVALID) || (try_count < 0))
> + if ((current_std == STD_INVALID) || (try_count <= 0))
> return -EINVAL;
>
> decoder->current_std = current_std;
[Hiremath, Vaibhav] I believe we don't need this fix here.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[Linux Media] [Older V4L] [Linux DVB] [Video Disk Recorder] [Linux Kernel] [Asterisk] [Photo] [DCCP] [Netdev] [Xorg] [Util Linux NG] [Xfree86] [Free Photo Albums] [Fedora Users] [Fedora Women] [ALSA Users] [ALSA Devel] [SSH] [DVB Maintainers] [Linux USB] [Yosemite Information]
![]() |
![]() |