• Arnd Bergmann's avatar
    media: v4l2-core: fix compat VIDIOC_DQEVENT for time64 ABI · 9983b2da
    Arnd Bergmann authored
    The native code supports the variant of struct v4l2_event for 64-bit
    time_t, so add the compat version as well.
    
    Here, a new incompatibility arises: while almost all 32-bit architectures
    now use the same layout as 64-bit architectures and the commands can
    simply be passed through, on x86 the internal alignment of v4l2_event
    is different because of the 64-bit member in v4l2_event_ctrl.
    
    To handle all architectures, this now requires defining four different
    versions of the structure to cover all possible combinations. The compat
    handling for VIDIOC_DQEVENT32 and VIDIOC_DQEVENT32_TIME32 is now inside
    of an #ifdef so it does not get used on architectures other than x86.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    9983b2da
v4l2-compat-ioctl32.c 42.9 KB