]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: v4l2-ioctl.c: use check_fmt for enum/g/s/try_fmt
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 24 Jan 2018 13:28:10 +0000 (08:28 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 22 Feb 2018 14:15:52 +0000 (08:15 -0600)
commitc9457952cb4f33104af45dc3ba1c130a748f4a38
tree6f4f85735d326bd3f03a85dd1472708735636303
parent6565735538cb4323b0f667f1847d20e781139c4c
media: v4l2-ioctl.c: use check_fmt for enum/g/s/try_fmt

BugLink: http://bugs.launchpad.net/bugs/1751064
commit b2469c814fbc8f1f19676dd4912717b798df511e upstream.

Don't duplicate the buffer type checks in enum/g/s/try_fmt.
The check_fmt function does that already.

It is hard to keep the checks in sync for all these functions and
in fact the check for VBI was wrong in the _fmt functions as it
allowed SDR types as well. This caused a v4l2-compliance failure
for /dev/swradio0 using vivid.

This simplifies the code and keeps the check in one place and
fixes the SDR/VBI bug.

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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/media/v4l2-core/v4l2-ioctl.c