aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/vivi.c19
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
1139static int vivi_release(struct inode *inode, struct file *file) 1124static int vivi_release(struct inode *inode, struct file *file)