media: vidtv: get rid of ENDIAN_BITFIELD nonsense
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 14 Sep 2020 09:28:18 +0000 (11:28 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 14 Sep 2020 13:48:48 +0000 (15:48 +0200)
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: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test-drivers/vidtv/vidtv_psi.h
drivers/media/test-drivers/vidtv/vidtv_ts.h

index def56bc..c9e059b 100644 (file)
@@ -99,17 +99,9 @@ struct vidtv_psi_table_header {
        __be16 bitfield; /* syntax: 1, zero: 1, one: 2, section_length: 13 */
 
        __be16 id; /* TS ID */
-#if defined(__LITTLE_ENDIAN_BITFIELD)
        u8  current_next:1;
        u8  version:5;
        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  last_section; /* last_section_number */
 } __packed;
index 7d46f48..fab5237 100644 (file)
@@ -53,19 +53,10 @@ struct vidtv_mpeg_ts {
        u8 sync_byte;
        __be16 bitfield; /* tei: 1, payload_start:1 priority: 1, pid:13 */
        struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
                u8 continuity_counter:4;
                u8 payload:1;
                u8 adaptation_field:1;
                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;
        struct vidtv_mpeg_ts_adaption adaption[];
 } __packed;