From 24d623c0110b5b825ab3cea6ea025ae52900e234 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Aug 2007 07:37:34 -0300 Subject: Fix vivi poll() method Due to the replace of videobuf_read_one to videobuf_read_stream, poll() method implementation is wrong. This fixes poll() implementation, making read of /dev/video? to work again. With this method, an USB driver can use video-buf, without needing to request memory from the DMA-safe area. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/vivi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index aa91f1a9a..fe872e253 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -1225,9 +1225,14 @@ vivi_poll(struct file *file, struct poll_table_struct *wait) } 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 || -- cgit v1.2.3