Commit 870e350d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: vidtv: get rid of ENDIAN_BITFIELD nonsense

The two places where ENDIAN_BITFIELD is used is for a single
8-bits integer. No need to correct endiannes on such cases.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 044e27ae
...@@ -99,17 +99,9 @@ struct vidtv_psi_table_header { ...@@ -99,17 +99,9 @@ struct vidtv_psi_table_header {
__be16 bitfield; /* syntax: 1, zero: 1, one: 2, section_length: 13 */ __be16 bitfield; /* syntax: 1, zero: 1, one: 2, section_length: 13 */
__be16 id; /* TS ID */ __be16 id; /* TS ID */
#if defined(__LITTLE_ENDIAN_BITFIELD)
u8 current_next:1; u8 current_next:1;
u8 version:5; u8 version:5;
u8 one2:2; u8 one2:2;
#elif defined(__BIG_ENDIAN_BITFIELD)
u8 one2:2;
u8 version:5;
u8 current_next:1;
#else
#error "Unknown bitfield ordering"
#endif
u8 section_id; /* section_number */ u8 section_id; /* section_number */
u8 last_section; /* last_section_number */ u8 last_section; /* last_section_number */
} __packed; } __packed;
......
...@@ -53,19 +53,10 @@ struct vidtv_mpeg_ts { ...@@ -53,19 +53,10 @@ struct vidtv_mpeg_ts {
u8 sync_byte; u8 sync_byte;
__be16 bitfield; /* tei: 1, payload_start:1 priority: 1, pid:13 */ __be16 bitfield; /* tei: 1, payload_start:1 priority: 1, pid:13 */
struct { struct {
#if defined(__LITTLE_ENDIAN_BITFIELD)
u8 continuity_counter:4; u8 continuity_counter:4;
u8 payload:1; u8 payload:1;
u8 adaptation_field:1; u8 adaptation_field:1;
u8 scrambling:2; u8 scrambling:2;
#elif defined(__BIG_ENDIAN_BITFIELD)
u8 scrambling:2;
u8 adaptation_field:1;
u8 payload:1;
u8 continuity_counter:4;
#else
#error "Unknown bitfield ordering"
#endif
} __packed; } __packed;
struct vidtv_mpeg_ts_adaption adaption[]; struct vidtv_mpeg_ts_adaption adaption[];
} __packed; } __packed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment