diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-streams.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-streams.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c index 63c336c95ff5..89c1ec94f335 100644 --- a/drivers/media/video/cx18/cx18-streams.c +++ b/drivers/media/video/cx18/cx18-streams.c | |||
@@ -37,13 +37,12 @@ | |||
37 | 37 | ||
38 | #define CX18_DSP0_INTERRUPT_MASK 0xd0004C | 38 | #define CX18_DSP0_INTERRUPT_MASK 0xd0004C |
39 | 39 | ||
40 | static struct file_operations cx18_v4l2_enc_fops = { | 40 | static struct v4l2_file_operations cx18_v4l2_enc_fops = { |
41 | .owner = THIS_MODULE, | 41 | .owner = THIS_MODULE, |
42 | .read = cx18_v4l2_read, | 42 | .read = cx18_v4l2_read, |
43 | .open = cx18_v4l2_open, | 43 | .open = cx18_v4l2_open, |
44 | /* FIXME change to video_ioctl2 if serialization lock can be removed */ | 44 | /* FIXME change to video_ioctl2 if serialization lock can be removed */ |
45 | .ioctl = cx18_v4l2_ioctl, | 45 | .ioctl = cx18_v4l2_ioctl, |
46 | .compat_ioctl = v4l_compat_ioctl32, | ||
47 | .release = cx18_v4l2_close, | 46 | .release = cx18_v4l2_close, |
48 | .poll = cx18_v4l2_enc_poll, | 47 | .poll = cx18_v4l2_enc_poll, |
49 | }; | 48 | }; |
@@ -61,49 +60,41 @@ static struct { | |||
61 | int num_offset; | 60 | int num_offset; |
62 | int dma; | 61 | int dma; |
63 | enum v4l2_buf_type buf_type; | 62 | enum v4l2_buf_type buf_type; |
64 | struct file_operations *fops; | ||
65 | } cx18_stream_info[] = { | 63 | } cx18_stream_info[] = { |
66 | { /* CX18_ENC_STREAM_TYPE_MPG */ | 64 | { /* CX18_ENC_STREAM_TYPE_MPG */ |
67 | "encoder MPEG", | 65 | "encoder MPEG", |
68 | VFL_TYPE_GRABBER, 0, | 66 | VFL_TYPE_GRABBER, 0, |
69 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 67 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
70 | &cx18_v4l2_enc_fops | ||
71 | }, | 68 | }, |
72 | { /* CX18_ENC_STREAM_TYPE_TS */ | 69 | { /* CX18_ENC_STREAM_TYPE_TS */ |
73 | "TS", | 70 | "TS", |
74 | VFL_TYPE_GRABBER, -1, | 71 | VFL_TYPE_GRABBER, -1, |
75 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 72 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
76 | &cx18_v4l2_enc_fops | ||
77 | }, | 73 | }, |
78 | { /* CX18_ENC_STREAM_TYPE_YUV */ | 74 | { /* CX18_ENC_STREAM_TYPE_YUV */ |
79 | "encoder YUV", | 75 | "encoder YUV", |
80 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET, | 76 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET, |
81 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 77 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
82 | &cx18_v4l2_enc_fops | ||
83 | }, | 78 | }, |
84 | { /* CX18_ENC_STREAM_TYPE_VBI */ | 79 | { /* CX18_ENC_STREAM_TYPE_VBI */ |
85 | "encoder VBI", | 80 | "encoder VBI", |
86 | VFL_TYPE_VBI, 0, | 81 | VFL_TYPE_VBI, 0, |
87 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VBI_CAPTURE, | 82 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VBI_CAPTURE, |
88 | &cx18_v4l2_enc_fops | ||
89 | }, | 83 | }, |
90 | { /* CX18_ENC_STREAM_TYPE_PCM */ | 84 | { /* CX18_ENC_STREAM_TYPE_PCM */ |
91 | "encoder PCM audio", | 85 | "encoder PCM audio", |
92 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_PCM_OFFSET, | 86 | VFL_TYPE_GRABBER, CX18_V4L2_ENC_PCM_OFFSET, |
93 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_PRIVATE, | 87 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_PRIVATE, |
94 | &cx18_v4l2_enc_fops | ||
95 | }, | 88 | }, |
96 | { /* CX18_ENC_STREAM_TYPE_IDX */ | 89 | { /* CX18_ENC_STREAM_TYPE_IDX */ |
97 | "encoder IDX", | 90 | "encoder IDX", |
98 | VFL_TYPE_GRABBER, -1, | 91 | VFL_TYPE_GRABBER, -1, |
99 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, | 92 | PCI_DMA_FROMDEVICE, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
100 | &cx18_v4l2_enc_fops | ||
101 | }, | 93 | }, |
102 | { /* CX18_ENC_STREAM_TYPE_RAD */ | 94 | { /* CX18_ENC_STREAM_TYPE_RAD */ |
103 | "encoder radio", | 95 | "encoder radio", |
104 | VFL_TYPE_RADIO, 0, | 96 | VFL_TYPE_RADIO, 0, |
105 | PCI_DMA_NONE, V4L2_BUF_TYPE_PRIVATE, | 97 | PCI_DMA_NONE, V4L2_BUF_TYPE_PRIVATE, |
106 | &cx18_v4l2_enc_fops | ||
107 | }, | 98 | }, |
108 | }; | 99 | }; |
109 | 100 | ||
@@ -184,7 +175,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type) | |||
184 | 175 | ||
185 | s->v4l2dev->num = num; | 176 | s->v4l2dev->num = num; |
186 | s->v4l2dev->parent = &cx->dev->dev; | 177 | s->v4l2dev->parent = &cx->dev->dev; |
187 | s->v4l2dev->fops = cx18_stream_info[type].fops; | 178 | s->v4l2dev->fops = &cx18_v4l2_enc_fops; |
188 | s->v4l2dev->release = video_device_release; | 179 | s->v4l2dev->release = video_device_release; |
189 | s->v4l2dev->tvnorms = V4L2_STD_ALL; | 180 | s->v4l2dev->tvnorms = V4L2_STD_ALL; |
190 | cx18_set_funcs(s->v4l2dev); | 181 | cx18_set_funcs(s->v4l2dev); |