]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[media] media: v4l2-ctrls: Fix 64bit support in get_ctrl()
authorBenoit Parrot <bparrot@ti.com>
Mon, 21 Sep 2015 16:03:21 +0000 (13:03 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 1 Oct 2015 11:43:41 +0000 (08:43 -0300)
commita8077734055f870ba630563868a6349671ca8dfc
tree0e52103a326681059e6def94881f381473658b46
parentd275d935900e10f01f2e43fb4a961ebcb48867bc
[media] media: v4l2-ctrls: Fix 64bit support in get_ctrl()

When trying to use v4l2_ctrl_g_ctrl_int64() to retrieve a
V4L2_CTRL_TYPE_INTEGER64 type value the internal helper function
get_ctrl() would prematurely exit because for this control type
the 'is_int' flag is not set. This would result in v4l2_ctrl_g_ctrl_int64
always returning 0.

Also v4l2_ctrl_g_ctrl_int64() is reading and returning the 32bit value
member instead of the 64bit version, so fixing that as well.

This patch extends the condition check to allow the V4L2_CTRL_TYPE_INTEGER64
type to continue processing instead of exiting.

Signed-off-by: Benoit Parrot <bparrot@ti.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@osg.samsung.com>
drivers/media/v4l2-core/v4l2-ctrls.c