From 91b49d810328bcc160d2a2d15822a95ac18a78b9 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 7 Feb 2013 07:05:43 -0300 Subject: [PATCH] --- yaml --- r: 357544 b: refs/heads/master c: 82f0efbcd3c4e6bf7cdfeed5c901b812e6d30f92 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/usb/tm6000/tm6000-video.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b5868c59d22c..153f6eb65201 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bf5bbed15c41228ea1abbb8d3931050922bfc37f +refs/heads/master: 82f0efbcd3c4e6bf7cdfeed5c901b812e6d30f92 diff --git a/trunk/drivers/media/usb/tm6000/tm6000-video.c b/trunk/drivers/media/usb/tm6000/tm6000-video.c index eab23413a909..1a6857929c15 100644 --- a/trunk/drivers/media/usb/tm6000/tm6000-video.c +++ b/trunk/drivers/media/usb/tm6000/tm6000-video.c @@ -1455,14 +1455,14 @@ __tm6000_poll(struct file *file, struct poll_table_struct *wait) if (list_empty(&fh->vb_vidq.stream)) return res | POLLERR; buf = list_entry(fh->vb_vidq.stream.next, struct tm6000_buffer, vb.stream); + poll_wait(file, &buf->vb.done, wait); + if (buf->vb.state == VIDEOBUF_DONE || + buf->vb.state == VIDEOBUF_ERROR) + return res | POLLIN | POLLRDNORM; } else if (req_events & (POLLIN | POLLRDNORM)) { /* read() capture */ return res | videobuf_poll_stream(file, &fh->vb_vidq, wait); } - poll_wait(file, &buf->vb.done, wait); - if (buf->vb.state == VIDEOBUF_DONE || - buf->vb.state == VIDEOBUF_ERROR) - return res | POLLIN | POLLRDNORM; return res; }