mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-17 16:14:25 +08:00
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
The field current_norm does not have to be set for g_parm to be a valid ioctl. Remove that check, but add a check whether this is a video node instead as g_parm only makes sense for those nodes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
0c142c8699
commit
a5ee6e41b2
@ -656,7 +656,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
|
||||
SET_VALID_IOCTL(ops, VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_DECODER_CMD, vidioc_decoder_cmd);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd);
|
||||
if (ops->vidioc_g_parm || vdev->current_norm)
|
||||
if (ops->vidioc_g_parm || vdev->vfl_type == VFL_TYPE_GRABBER)
|
||||
set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_G_TUNER, vidioc_g_tuner);
|
||||
|
Loading…
Reference in New Issue
Block a user