]> git.baikalelectronics.ru Git - kernel.git/commit
media: coda: disable encoder cmd ioctl on decoder and vice versa
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 4 Apr 2022 16:35:28 +0000 (17:35 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 07:43:22 +0000 (08:43 +0100)
commita809314c6306c97d36a4e6c92563525c2b949eef
tree846ca03ffa9220a469f0634b027e3829b3b836c4
parente10f15b038c3e5194f1572f9d12ff1139115e4a1
media: coda: disable encoder cmd ioctl on decoder and vice versa

Use v4l2_disable_ioctl() to disable the VIDIOC_TRY_ENCODER_CMD and
VIDIOC_ENCODER_CMD ioctls on decoder video devices and the
VIDIOC_TRY_DECODER_CMD and VIDIOC_DECODER_CMD ioctls on encoder
video devices.

This allows to drop the coda_try_encoder/decoder_cmd() functions
and to use v4l2_m2m_ioctl_try_encoder/decoder_cmd() directly.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/chips-media/coda-common.c