[pvrusb2] [PATCH?] division to bit-or of tveeprom standards
Roel Kluin
12o3l at tiscali.nl
Thu Nov 29 11:12:28 CST 2007
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,
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.
--
Change division to bit-or for tveeprom standards
Signed-off-by: Roel Kluin <12o3l at tiscali.nl>
---
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 402c594..e8b6059 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1731,7 +1731,7 @@ 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,
+ .std = V4L2_STD_PAL_D | V4L2_STD_PAL_D1 | V4L2_STD_PAL_K,
},
};
More information about the pvrusb2
mailing list