[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-video
Subject:    Re: [pvrusb2] [PATCH?] division to bit-or of tveeprom standards
From:       Mike Isely <isely () isely ! net>
Date:       2007-11-29 18:25:45
Message-ID: Pine.LNX.4.64.0711291223250.7150 () cnc ! isely ! net
[Download RAW message or body]

On Thu, 29 Nov 2007, Roel Kluin wrote:

> Considering struct pvr2_std_hack - a data structure that labels specific
> combinations of standards from tveeprom - line 1715 in 
> drivers/media/video/pvrusb2/pvrusb2-hdw.c:
> 
> const static struct pvr2_std_hack std_eeprom_maps[] = {
> ...
>         {       /* PAL(D/D1/K) */
>                 .pat = V4L2_STD_DK,
> 		.std = V4L2_STD_PAL_D/V4L2_STD_PAL_D1|V4L2_STD_PAL_K,
>         },
> };
> 
> Note that due to operator precedence this is equivalent to:
> 		.std = (V4L2_STD_PAL_D / V4L2_STD_PAL_D1) | V4L2_STD_PAL_K,

That is clearly a bug!

> 
> is this intended? It appears to me due to the comments that intended is:
> 		.std = V4L2_STD_PAL_D | V4L2_STD_PAL_D1 | V4L2_STD_PAL_K,
> 
> Please comment: I am no expert in this. If correctly assumed consider the
> patch below.

Comment:  You are absolutely correct.  Thanks for spotting this and I'll 
post an update as soon as I can (which will be a few days yet, 
unfortunately).

  -Mike



-- 
                        |         Mike Isely          |     PGP fingerprint
     Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                        |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                        |                             |

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic