Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85c7c70bc241d506dffc1879158f77f8aac69734
Commit:     85c7c70bc241d506dffc1879158f77f8aac69734
Parent:     a326ae1126fddd07728e854322e0c657c6b1fbda
Author:     Brandon Philips <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 27 20:55:02 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 00:03:05 2007 -0300

    V4L/DVB (6274): 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 <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/vivi.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 512128a..cdef622 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)
 {
        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 */
-               return videobuf_poll_stream(file, &fh-> vb_vidq,
-                                           wait);
-       }
-       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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to