From: Hans Verkuil Date: Wed, 5 Sep 2012 15:28:06 +0000 (-0300) Subject: [media] ivtv: disable a bunch of ioctls that are invalid for the decoder VBI X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5f9c82c021cca74ad9a2dd48353c01bad567815e;p=openwrt%2Fstaging%2Fblogic.git [media] ivtv: disable a bunch of ioctls that are invalid for the decoder VBI The VBI capture for the decoder (/dev/vbi8) is special in that it captures the VBI stream embedded in an MPEG stream that is being decoded. A lot of the ioctls that would normally be valid have to be disabled since they make no sense for such a device, and v4l2-compliance will complain about that. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c index 3455f465ff13..70dad588a677 100644 --- a/drivers/media/pci/ivtv/ivtv-streams.c +++ b/drivers/media/pci/ivtv/ivtv-streams.c @@ -238,6 +238,19 @@ static int ivtv_prep_dev(struct ivtv *itv, int type) s->vdev->release = video_device_release; s->vdev->tvnorms = V4L2_STD_ALL; s->vdev->lock = &itv->serialize_lock; + if (s->type == IVTV_DEC_STREAM_TYPE_VBI) { + v4l2_disable_ioctl(s->vdev, VIDIOC_S_AUDIO); + v4l2_disable_ioctl(s->vdev, VIDIOC_G_AUDIO); + v4l2_disable_ioctl(s->vdev, VIDIOC_ENUMAUDIO); + v4l2_disable_ioctl(s->vdev, VIDIOC_ENUMINPUT); + v4l2_disable_ioctl(s->vdev, VIDIOC_S_INPUT); + v4l2_disable_ioctl(s->vdev, VIDIOC_G_INPUT); + v4l2_disable_ioctl(s->vdev, VIDIOC_S_FREQUENCY); + v4l2_disable_ioctl(s->vdev, VIDIOC_G_FREQUENCY); + v4l2_disable_ioctl(s->vdev, VIDIOC_S_TUNER); + v4l2_disable_ioctl(s->vdev, VIDIOC_G_TUNER); + v4l2_disable_ioctl(s->vdev, VIDIOC_S_STD); + } set_bit(V4L2_FL_USE_FH_PRIO, &s->vdev->flags); ivtv_set_funcs(s->vdev); return 0;