OSDN Git Service

media: v4l2-ctrl: Fix flags field on Control events
authorRicardo Ribalda <ricardo.ribalda@gmail.com>
Tue, 17 Oct 2017 15:48:50 +0000 (11:48 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 11:21:00 +0000 (07:21 -0400)
commit9cac9d2fb2fe0e0cadacdb94415b3fe49e3f724f
treea9f67a24c2aa233504ea43a6dfe687a3f208f385
parent0cba3f438cd6154621a3b4d66e0875ba213cd7ab
media: v4l2-ctrl: Fix flags field on Control events

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>
Cc: <stable@vger.kernel.org> # for v3.17 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-ctrls.c