Commit 61a76141 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Mauro Carvalho Chehab

media: mtk-vcodec: vdec: use helpers in VIDIOC_(TRY_)DECODER_CMD

Let's use the dedicated helpers to make sure we get the expected
behavior and remove redundant code.
Signed-off-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a5694cb7
......@@ -484,18 +484,7 @@ static void mtk_vdec_worker(struct work_struct *work)
static int vidioc_try_decoder_cmd(struct file *file, void *priv,
struct v4l2_decoder_cmd *cmd)
{
switch (cmd->cmd) {
case V4L2_DEC_CMD_STOP:
case V4L2_DEC_CMD_START:
if (cmd->flags != 0) {
mtk_v4l2_err("cmd->flags=%u", cmd->flags);
return -EINVAL;
}
break;
default:
return -EINVAL;
}
return 0;
return v4l2_m2m_ioctl_try_decoder_cmd(file, priv, cmd);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment