summaryrefslogtreecommitdiff
path: root/drivers/media/video/vivi.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-08-27 14:37:34 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-10 07:02:49 +0400
commit40558dafff257d69248af8b96c7e896f6bc79dfa (patch)
treea99e886611d3b672a09bfc2619391055fec7c6df /drivers/media/video/vivi.c
parentba366a23b68029fc8560acf1ad8735eed910f962 (diff)
downloadlinux-40558dafff257d69248af8b96c7e896f6bc79dfa.tar.xz
V4L/DVB (6259): 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 <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r--drivers/media/video/vivi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index c14e2b3e4241..01c977671311 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -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 ||