media: v4l2: move v4l2_ext_controls conversion
authorArnd Bergmann <arnd@arndb.de>
Fri, 30 Oct 2020 16:55:24 +0000 (17:55 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:06 +0000 (10:31 +0100)
commit6c9361e739a549742a39d8372f37add56e343604
treeb1a3c4d345fa2a9f1e4cff74c5e6c51e23e7a76c
parent3b8bc8912adf293291bfbf1be2c7214014f6c313
media: v4l2: move v4l2_ext_controls conversion

The v4l2_ext_controls ioctl handlers use an indirect pointer to an
incompatible data structure, making the conversion particularly tricky.

Moving the compat implementation to use the new
v4l2_compat_get_user()/v4l2_compat_put_user() helpers makes it
noticeably simpler.

In v4l2_compat_get_array_args()/v4l2_compat_put_array_args(),
the 'file' argument needs to get passed to determine the
exact format, which is a bit unfortunate, as no other conversion
needs these.

[hverkuil: fix: WARNING: Missing a blank line after declarations]
[hverkuil: fix: CHECK: Please don't use multiple blank lines]

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