diff options
author | Andy Walls <awalls@radix.net> | 2009-02-28 16:48:27 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:09 -0400 |
commit | 583803d135b14d414e77b6d2b546a811cac9944e (patch) | |
tree | 62f0085134ac586336378980d07e76698623806a /drivers/media/video/cx18 | |
parent | 386e439f0c32eb540e931b0d1874e3fd1a8a8f10 (diff) |
V4L/DVB (10853): cx18: Fix s-parse warnings and a logic error about extracting the VBI PTS
My s-parse builds never griped about be32_to_cpu() casting to __be32, but Hans'
builds did. This change explictly declares the pointer into the VBI buffer
header as __be32, which is the correct thing to do as the data is always
big endian when we go to fetch it. Hopefully this will quiet s-parse warnings.
Also corrected a misplaced parenthesis logic error in checking for the VBI
header magic number.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18')
-rw-r--r-- | drivers/media/video/cx18/cx18-vbi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/cx18/cx18-vbi.c b/drivers/media/video/cx18/cx18-vbi.c index a81fe2e985f2..355737bff13e 100644 --- a/drivers/media/video/cx18/cx18-vbi.c +++ b/drivers/media/video/cx18/cx18-vbi.c | |||
@@ -169,7 +169,7 @@ void cx18_process_vbi_data(struct cx18 *cx, struct cx18_buffer *buf, | |||
169 | int streamtype) | 169 | int streamtype) |
170 | { | 170 | { |
171 | u8 *p = (u8 *) buf->buf; | 171 | u8 *p = (u8 *) buf->buf; |
172 | u32 *q = (u32 *) buf->buf; | 172 | __be32 *q = (__be32 *) buf->buf; |
173 | u32 size = buf->bytesused; | 173 | u32 size = buf->bytesused; |
174 | u32 pts; | 174 | u32 pts; |
175 | int lines; | 175 | int lines; |
@@ -178,8 +178,9 @@ void cx18_process_vbi_data(struct cx18 *cx, struct cx18_buffer *buf, | |||
178 | return; | 178 | return; |
179 | 179 | ||
180 | /* | 180 | /* |
181 | * The CX23418 sends us data that is 32 bit LE swapped, but we want | 181 | * The CX23418 sends us data that is 32 bit little-endian swapped, |
182 | * the raw VBI bytes in the order they were in the raster line | 182 | * but we want the raw VBI bytes in the order they were in the raster |
183 | * line. This has a side effect of making the 12 byte header big endian | ||
183 | */ | 184 | */ |
184 | cx18_buf_swap(buf); | 185 | cx18_buf_swap(buf); |
185 | 186 | ||
@@ -218,7 +219,7 @@ void cx18_process_vbi_data(struct cx18 *cx, struct cx18_buffer *buf, | |||
218 | 219 | ||
219 | /* Sliced VBI data with data insertion */ | 220 | /* Sliced VBI data with data insertion */ |
220 | 221 | ||
221 | pts = (be32_to_cpu(q[0] == 0x3fffffff)) ? be32_to_cpu(q[2]) : 0; | 222 | pts = (be32_to_cpu(q[0]) == 0x3fffffff) ? be32_to_cpu(q[2]) : 0; |
222 | 223 | ||
223 | /* | 224 | /* |
224 | * For calls to compress_sliced_buf(), ensure there are an integral | 225 | * For calls to compress_sliced_buf(), ensure there are an integral |