diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-10-01 09:45:36 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 20:22:14 (GMT) |
commit | dff274fd86e401880d2d10c1dd7fa1fcb6d2bdbc (patch) | |
tree | f21d8d06ffb5fc00857f33698bbb136e96874129 /drivers/media/pci/ivtv/ivtv-ioctl.c | |
parent | 7eaf49667e23a11a1f6ec88dad51ad0e93b1445d (diff) | |
download | linux-fsl-qoriq-dff274fd86e401880d2d10c1dd7fa1fcb6d2bdbc.tar.xz |
[media] ivtv: don't allow g/s_frequency for output device nodes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index e5ce970..5537c88 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -1064,7 +1064,10 @@ static int ivtv_s_output(struct file *file, void *fh, unsigned int outp) static int ivtv_g_frequency(struct file *file, void *fh, struct v4l2_frequency *vf) { struct ivtv *itv = fh2id(fh)->itv; + struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; + if (s->vdev->vfl_dir) + return -ENOTTY; if (vf->tuner != 0) return -EINVAL; @@ -1075,7 +1078,10 @@ static int ivtv_g_frequency(struct file *file, void *fh, struct v4l2_frequency * int ivtv_s_frequency(struct file *file, void *fh, struct v4l2_frequency *vf) { struct ivtv *itv = fh2id(fh)->itv; + struct ivtv_stream *s = &itv->streams[fh2id(fh)->type]; + if (s->vdev->vfl_dir) + return -ENOTTY; if (vf->tuner != 0) return -EINVAL; |