diff options
author | Brandon Philips <bphilips@suse.de> | 2007-09-27 19:55:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 23:03:05 -0400 |
commit | 85c7c70bc241d506dffc1879158f77f8aac69734 (patch) | |
tree | 7a563bf53c168a74f8822f597ebdb8fb5c1de4b4 /drivers/media/video/vivi.c | |
parent | a326ae1126fddd07728e854322e0c657c6b1fbda (diff) |
V4L/DVB (6274): V4L: vivi.c replace logic in vivi_poll with videobuf_poll_stream
Since vivi is using videobuf_read_stream() it can use videobuf_poll_stream()
now.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r-- | drivers/media/video/vivi.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 512128a6f58c..cdef622f6b32 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -1111,29 +1111,14 @@ vivi_poll(struct file *file, struct poll_table_struct *wait) | |||
1111 | { | 1111 | { |
1112 | struct vivi_fh *fh = file->private_data; | 1112 | struct vivi_fh *fh = file->private_data; |
1113 | struct vivi_buffer *buf; | 1113 | struct vivi_buffer *buf; |
1114 | struct videobuf_queue *q = &fh->vb_vidq; | ||
1114 | 1115 | ||
1115 | dprintk(1,"%s\n",__FUNCTION__); | 1116 | dprintk(1,"%s\n",__FUNCTION__); |
1116 | 1117 | ||
1117 | if (V4L2_BUF_TYPE_VIDEO_CAPTURE != fh->type) | 1118 | if (V4L2_BUF_TYPE_VIDEO_CAPTURE != fh->type) |
1118 | return POLLERR; | 1119 | return POLLERR; |
1119 | 1120 | ||
1120 | if (res_get(fh->dev,fh)) { | 1121 | return videobuf_poll_stream(file, q, wait); |
1121 | dprintk(1,"poll: mmap interface\n"); | ||
1122 | /* streaming capture */ | ||
1123 | if (list_empty(&fh->vb_vidq.stream)) | ||
1124 | return POLLERR; | ||
1125 | buf = list_entry(fh->vb_vidq.stream.next,struct vivi_buffer,vb.stream); | ||
1126 | } else { | ||
1127 | dprintk(1,"poll: read() interface\n"); | ||
1128 | /* read() capture */ | ||
1129 | return videobuf_poll_stream(file, &fh-> vb_vidq, | ||
1130 | wait); | ||
1131 | } | ||
1132 | poll_wait(file, &buf->vb.done, wait); | ||
1133 | if (buf->vb.state == STATE_DONE || | ||
1134 | buf->vb.state == STATE_ERROR) | ||
1135 | return POLLIN|POLLRDNORM; | ||
1136 | return 0; | ||
1137 | } | 1122 | } |
1138 | 1123 | ||
1139 | static int vivi_release(struct inode *inode, struct file *file) | 1124 | static int vivi_release(struct inode *inode, struct file *file) |