]> asedeno.scripts.mit.edu Git - linux.git/commit
media: v4l2-core: fix compat VIDIOC_DQEVENT for time64 ABI
authorArnd Bergmann <arnd@arndb.de>
Mon, 16 Dec 2019 14:15:05 +0000 (15:15 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 3 Jan 2020 14:52:36 +0000 (15:52 +0100)
commit9983b2daf1ca4602c32e38a4ef98a6a2b1156b90
tree018b66622e91aeebdf0dcbad3ddefef0039864a3
parent577c89b0ce726e44c08c396d14f84a00070a57b7
media: v4l2-core: fix compat VIDIOC_DQEVENT for time64 ABI

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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c