V4L/DVB (6259): Fix vivi poll() method
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 27 Aug 2007 10:37:34 +0000 (07:37 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 03:02:49 +0000 (00:02 -0300)
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 <mchehab@infradead.org>
drivers/media/video/vivi.c

index c14e2b3e42413253394d07dd90ab2362388290ed..01c97767131135d7cb49a7569ab1762ded1656dd 100644 (file)
@@ -1122,9 +1122,8 @@ vivi_poll(struct file *file, struct poll_table_struct *wait)
        } else {
                dprintk(1,"poll: read() interface\n");
                /* read() capture */
-               buf = (struct vivi_buffer*)fh->vb_vidq.read_buf;
-               if (NULL == buf)
-                       return POLLERR;
+               return videobuf_poll_stream(file, &fh-> vb_vidq,
+                                           wait);
        }
        poll_wait(file, &buf->vb.done, wait);
        if (buf->vb.state == STATE_DONE ||