From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Subject: [RFCv1 PATCH 6/6] vivi: let vb2_poll handle events.
Date: Wed, 13 Jul 2011 11:39:04 +0200 [thread overview]
Message-ID: <50a6d38b50c4cf10cd66e3cc3fd2fef4802423fb.1310549521.git.hans.verkuil@cisco.com> (raw)
In-Reply-To: <1310549944-23756-1-git-send-email-hverkuil@xs4all.nl>
In-Reply-To: <bec0b6db54a6b435d219e5ad2d9f010848dd8c2b.1310549521.git.hans.verkuil@cisco.com>
From: Hans Verkuil <hans.verkuil@cisco.com>
The vb2_poll function now tests for events and sets POLLPRI accordingly.
So there it is no longer necessary to test for it in the vivi driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/video/vivi.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index a848bd2..fc3c88f 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1039,17 +1039,10 @@ static unsigned int
vivi_poll(struct file *file, struct poll_table_struct *wait)
{
struct vivi_dev *dev = video_drvdata(file);
- struct v4l2_fh *fh = file->private_data;
struct vb2_queue *q = &dev->vb_vidq;
- unsigned int res;
dprintk(dev, 1, "%s\n", __func__);
- res = vb2_poll(q, file, wait);
- if (v4l2_event_pending(fh))
- res |= POLLPRI;
- else
- poll_wait(file, &fh->wait, wait);
- return res;
+ return vb2_poll(q, file, wait);
}
static int vivi_close(struct file *file)
--
1.7.1
prev parent reply other threads:[~2011-07-13 9:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 9:38 [RFCv1 PATCH 0/6] Don't start streaming unless requested by the poll mask Hans Verkuil
2011-07-13 9:38 ` [RFCv1 PATCH 1/6] poll: add poll_requested_events() function Hans Verkuil
2011-07-13 9:39 ` [RFCv1 PATCH 2/6] ivtv: only start streaming in poll() if polling for input Hans Verkuil
2011-07-13 9:39 ` [RFCv1 PATCH 3/6] videobuf2: only start streaming in poll() if so requested by the poll mask Hans Verkuil
2011-07-18 6:30 ` Marek Szyprowski
2011-07-20 3:41 ` Pawel Osciak
2011-07-13 9:39 ` [RFCv1 PATCH 4/6] videobuf: " Hans Verkuil
2011-07-13 9:39 ` [RFCv1 PATCH 5/6] videobuf2-core: also test for pending events Hans Verkuil
2011-07-18 6:30 ` Marek Szyprowski
2011-07-20 3:39 ` Pawel Osciak
2011-07-13 9:39 ` Hans Verkuil [this message]
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=50a6d38b50c4cf10cd66e3cc3fd2fef4802423fb.1310549521.git.hans.verkuil@cisco.com \
--to=hverkuil@xs4all.nl \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).