]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: v4l2-ctrl: Fix flags field on Control events
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Tue, 17 Oct 2017 15:48:50 +0000 (11:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:35:53 +0000 (08:35 +0000)
commit49fd514f53514a6f296b65bd59bd03aa703013fa
treecc9d84bc2de2da8d0ff13e9e249048347be25cd8
parent0cbab0776bd74966db8a6829b423dd42295e3580
media: v4l2-ctrl: Fix flags field on Control events

commit 9cac9d2fb2fe0e0cadacdb94415b3fe49e3f724f upstream.

VIDIOC_DQEVENT and VIDIOC_QUERY_EXT_CTRL should give the same output for
the control flags field.

This patch creates a new function user_flags(), that calculates the user
exported flags value (which is different than the kernel internal flags
structure). This function is then used by all the code that exports the
internal flags to userspace.

Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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-ctrls.c