summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ivtv/ivtv-streams.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-10-01 11:23:53 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-01 22:14:27 +0200
commit7eaf49667e23a11a1f6ec88dad51ad0e93b1445d (patch)
tree5991c6f693139ba344b54c0b6869134c8bab57e9 /drivers/media/pci/ivtv/ivtv-streams.c
parent[media] ivtv: fix v4l2-compliance error: inconsistent std reporting (diff)
downloadlinux-7eaf49667e23a11a1f6ec88dad51ad0e93b1445d.tar.xz
linux-7eaf49667e23a11a1f6ec88dad51ad0e93b1445d.zip
[media] ivtv: fix v4l2-compliance errors for the radio device
- fix error code when attempting to read from write-only streams. - fix error code when attempting to write to read-only streams. - don't start capturing when polling on a radio node. - give the radio node its own file operations struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/media/pci/ivtv/ivtv-streams.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c
index 7b8648a827f5..3455f465ff13 100644
--- a/drivers/media/pci/ivtv/ivtv-streams.c
+++ b/drivers/media/pci/ivtv/ivtv-streams.c
@@ -65,6 +65,14 @@ static const struct v4l2_file_operations ivtv_v4l2_dec_fops = {
.poll = ivtv_v4l2_dec_poll,
};
+static const struct v4l2_file_operations ivtv_v4l2_radio_fops = {
+ .owner = THIS_MODULE,
+ .open = ivtv_v4l2_open,
+ .unlocked_ioctl = video_ioctl2,
+ .release = ivtv_v4l2_close,
+ .poll = ivtv_v4l2_enc_poll,
+};
+
#define IVTV_V4L2_DEC_MPG_OFFSET 16 /* offset from 0 to register decoder mpg v4l2 minors on */
#define IVTV_V4L2_ENC_PCM_OFFSET 24 /* offset from 0 to register pcm v4l2 minors on */
#define IVTV_V4L2_ENC_YUV_OFFSET 32 /* offset from 0 to register yuv v4l2 minors on */
@@ -116,7 +124,7 @@ static struct {
VFL_TYPE_RADIO, 0,
PCI_DMA_NONE, 1,
V4L2_CAP_RADIO | V4L2_CAP_TUNER,
- &ivtv_v4l2_enc_fops
+ &ivtv_v4l2_radio_fops
},
{ /* IVTV_DEC_STREAM_TYPE_MPG */
"decoder MPG",