diff options
author | bphilips@suse.de <bphilips@suse.de> | 2007-09-27 20:55:02 -0300 |
---|---|---|
committer | bphilips@suse.de <bphilips@suse.de> | 2007-09-27 20:55:02 -0300 |
commit | c672dfca45192151e3acb5ffae1c5fd8fec3f95b (patch) | |
tree | 1ca1449cac5bf61cd76960954d977a56856a4c79 /linux/drivers/media/video | |
parent | 8704d9503c0b345ac2b63ee06cdb208e24a1c853 (diff) | |
download | mediapointer-dvb-s2-c672dfca45192151e3acb5ffae1c5fd8fec3f95b.tar.gz mediapointer-dvb-s2-c672dfca45192151e3acb5ffae1c5fd8fec3f95b.tar.bz2 |
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 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/vivi.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index d75206483..1a9a2b6b6 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -1214,35 +1214,14 @@ vivi_poll(struct file *file, struct poll_table_struct *wait) { struct vivi_fh *fh = file->private_data; struct vivi_buffer *buf; + struct videobuf_queue *q = &fh->vb_vidq; dprintk(1,"%s\n",__FUNCTION__); if (V4L2_BUF_TYPE_VIDEO_CAPTURE != fh->type) return POLLERR; - if (res_get(fh->dev,fh)) { - dprintk(1,"poll: mmap interface\n"); - /* streaming capture */ - if (list_empty(&fh->vb_vidq.stream)) - return POLLERR; - buf = list_entry(fh->vb_vidq.stream.next,struct vivi_buffer,vb.stream); - } else { - dprintk(1,"poll: read() interface\n"); - /* read() capture */ -#if 0 - buf = (struct vivi_buffer*)fh->vb_vidq.read_buf; - if (NULL == buf) - return POLLERR; -#else - return videobuf_poll_stream(file, &fh-> vb_vidq, - wait); -#endif - } - poll_wait(file, &buf->vb.done, wait); - if (buf->vb.state == STATE_DONE || - buf->vb.state == STATE_ERROR) - return POLLIN|POLLRDNORM; - return 0; + return videobuf_poll_stream(file, q, wait); } static int vivi_release(struct inode *inode, struct file *file) |