From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk, Jonathan Corbet <corbet@lwn.net>,
Andrew Morton <akpm@linux-foundation.org>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: [RFCv4 PATCH 4/6] videobuf: only start streaming in poll() if so requested by the poll mask.
Date: Thu, 29 Sep 2011 09:44:10 +0200 [thread overview]
Message-ID: <0ff6a902e6c8cf127bd60e813996d155fb2578a3.1317281827.git.hans.verkuil@cisco.com> (raw)
In-Reply-To: <1317282252-8290-1-git-send-email-hverkuil@xs4all.nl>
In-Reply-To: <8488cb7deae3c3da6b079c8ebdcacce1f86dd433.1317281827.git.hans.verkuil@cisco.com>
From: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/video/videobuf-core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index de4fa4e..ffdf59c 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -1129,6 +1129,7 @@ unsigned int videobuf_poll_stream(struct file *file,
struct videobuf_queue *q,
poll_table *wait)
{
+ unsigned long req_events = poll_requested_events(wait);
struct videobuf_buffer *buf = NULL;
unsigned int rc = 0;
@@ -1137,7 +1138,7 @@ unsigned int videobuf_poll_stream(struct file *file,
if (!list_empty(&q->stream))
buf = list_entry(q->stream.next,
struct videobuf_buffer, stream);
- } else {
+ } else if (req_events & (POLLIN | POLLRDNORM)) {
if (!q->reading)
__videobuf_read_start(q);
if (!q->reading) {
--
1.7.5.4
next prev parent reply other threads:[~2011-09-29 7:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 7:44 [RFCv4 PATCH 0/6]: add poll_requested_events() function Hans Verkuil
2011-09-29 7:44 ` [RFCv4 PATCH 1/6] poll: " Hans Verkuil
2011-09-29 7:44 ` [RFCv4 PATCH 2/6] ivtv: only start streaming in poll() if polling for input Hans Verkuil
2011-10-02 12:13 ` Andy Walls
2011-09-29 7:44 ` [RFCv4 PATCH 3/6] videobuf2: only start streaming in poll() if so requested by the poll mask Hans Verkuil
2011-09-29 7:44 ` Hans Verkuil [this message]
2011-09-29 7:44 ` [RFCv4 PATCH 5/6] videobuf2-core: also test for pending events Hans Verkuil
2011-09-29 7:44 ` [RFCv4 PATCH 6/6] vivi: let vb2_poll handle events Hans Verkuil
2011-10-05 7:47 ` [RFCv4 PATCH 0/6]: add poll_requested_events() function Hans Verkuil
2011-10-05 21:01 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0ff6a902e6c8cf127bd60e813996d155fb2578a3.1317281827.git.hans.verkuil@cisco.com \
--to=hverkuil@xs4all.nl \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=hans.verkuil@cisco.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.