V4L/DVB (12791): tm6000: fix poll() method
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 27 Aug 2007 10:55:38 +0000 (07:55 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:39:39 +0000 (00:39 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-video.c

index 9557dfe95ef0f3a71a9856824226a9e3e71557f1..f96c7a77efb66223af5460f2bf6a6d0569228a89 100644 (file)
@@ -1449,9 +1449,8 @@ tm6000_poll(struct file *file, struct poll_table_struct *wait)
                buf = list_entry(fh->vb_vidq.stream.next,struct tm6000_buffer,vb.stream);
        } else {
                /* read() capture */
-               buf = (struct tm6000_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 ||