Skip to content

Commit

Permalink
[media] vivi: let vb2_poll handle events
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 27, 2012
1 parent 95213ce commit 0bf0f71
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0bf0f71

Please sign in to comment.