Prevent kernel code from accidentally using the old MPEG aliases by placing them all under #ifndef __KERNEL__. Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> --- include/uapi/linux/v4l2-controls.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 2e8d450495fa..a70c39f191f4 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1652,16 +1652,10 @@ struct v4l2_ctrl_fwht_params { __u32 quantization; }; -/* MPEG-compression definitions kept for backwards compatibility */ #ifndef __KERNEL__ -#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC -#define V4L2_CID_MPEG_CLASS V4L2_CID_CODEC_CLASS -#define V4L2_CID_MPEG_BASE V4L2_CID_CODEC_BASE -#define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE -#define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE -#endif - /* + * MPEG-compression definitions kept for backwards compatibility. + * * Originally all these controls and data structures where all called * MPEG, regardless for which codec they actually applied to. This was * due to historical reasons: the MPEG codec was the first added to V4L2, @@ -1671,6 +1665,13 @@ struct v4l2_ctrl_fwht_params { * Now that MPEG has been replaced with CODEC, we still need to keep * the old names around to avoid breaking the ABI, hence these defines. */ + +#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC +#define V4L2_CID_MPEG_CLASS V4L2_CID_CODEC_CLASS +#define V4L2_CID_MPEG_BASE V4L2_CID_CODEC_BASE +#define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE +#define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE + #define v4l2_mpeg_stream_type v4l2_codec_stream_type #define V4L2_MPEG_STREAM_TYPE_MPEG2_PS V4L2_CODEC_STREAM_TYPE_MPEG2_PS #define V4L2_MPEG_STREAM_TYPE_MPEG2_TS V4L2_CODEC_STREAM_TYPE_MPEG2_TS @@ -2230,3 +2231,5 @@ struct v4l2_ctrl_fwht_params { #define v4l2_cid_mpeg_video_hevc_size_of_length_field v4l2_codec_video_hevc_size_of_length_field #endif + +#endif -- 2.30.1