media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer
commit4e364b677035b61ecb9560dcc9a4bc9540f55cbe
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 24 Jan 2018 10:30:59 +0000 (24 05:30 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:06:49 +0000 (16 20:06 +0100)
tree46b45886dff602316a7925c8fd273b83cce4f1b8
parent9c15a21a0737a422e9c3a4ff7a0f1e2085e41855
media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer

commit b8c601e8af2d08f733d74defa8465303391bb930 upstream.

ctrl_is_pointer just hardcoded two known string controls, but that
caused problems when using e.g. custom controls that use a pointer
for the payload.

Reimplement this function: it now finds the v4l2_ctrl (if the driver
uses the control framework) or it calls vidioc_query_ext_ctrl (if the
driver implements that directly).

In both cases it can now check if the control is a pointer control
or not.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c