Commit 0bf0f713 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] vivi: let vb2_poll handle events

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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 95213ceb
...@@ -1039,17 +1039,10 @@ static unsigned int ...@@ -1039,17 +1039,10 @@ static unsigned int
vivi_poll(struct file *file, struct poll_table_struct *wait) vivi_poll(struct file *file, struct poll_table_struct *wait)
{ {
struct vivi_dev *dev = video_drvdata(file); struct vivi_dev *dev = video_drvdata(file);
struct v4l2_fh *fh = file->private_data;
struct vb2_queue *q = &dev->vb_vidq; struct vb2_queue *q = &dev->vb_vidq;
unsigned int res;
dprintk(dev, 1, "%s\n", __func__); dprintk(dev, 1, "%s\n", __func__);
res = vb2_poll(q, file, wait); return vb2_poll(q, file, wait);
if (v4l2_event_pending(fh))
res |= POLLPRI;
else
poll_wait(file, &fh->wait, wait);
return res;
} }
static int vivi_close(struct file *file) static int vivi_close(struct file *file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment