diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-25 10:58:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-11 17:11:40 -0400 |
commit | a5ee6e41b2dee2aae2930278ba070ea8385db040 (patch) | |
tree | c0f313c2311862cf1d5e68a17a0b59df64421b52 /drivers/media/video | |
parent | 0c142c86991551b8b9675ab72609f7a29ee2e1e3 (diff) |
[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>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 150020805681..83dbb2ddff10 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -656,7 +656,7 @@ static void determine_valid_ioctls(struct video_device *vdev) | |||
656 | SET_VALID_IOCTL(ops, VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd); | 656 | SET_VALID_IOCTL(ops, VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd); |
657 | SET_VALID_IOCTL(ops, VIDIOC_DECODER_CMD, vidioc_decoder_cmd); | 657 | SET_VALID_IOCTL(ops, VIDIOC_DECODER_CMD, vidioc_decoder_cmd); |
658 | SET_VALID_IOCTL(ops, VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd); | 658 | SET_VALID_IOCTL(ops, VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd); |
659 | if (ops->vidioc_g_parm || vdev->current_norm) | 659 | if (ops->vidioc_g_parm || vdev->vfl_type == VFL_TYPE_GRABBER) |
660 | set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls); | 660 | set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls); |
661 | SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm); | 661 | SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm); |
662 | SET_VALID_IOCTL(ops, VIDIOC_G_TUNER, vidioc_g_tuner); | 662 | SET_VALID_IOCTL(ops, VIDIOC_G_TUNER, vidioc_g_tuner); |