aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/vivi.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-07-13 03:28:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-27 10:41:56 -0400
commit0bf0f713d6e6b9f1c510d598c29ac17812a4eea5 (patch)
tree1240ef88b5ff7e221bfade608529ea33274ae0e3 /drivers/media/video/vivi.c
parent95213ceb1b527b8102c589bd41fcb7c9163fdd79 (diff)
[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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r--drivers/media/video/vivi.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 5e8b0710105b..b456d3ed1197 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1039,17 +1039,10 @@ static unsigned int
1039vivi_poll(struct file *file, struct poll_table_struct *wait) 1039vivi_poll(struct file *file, struct poll_table_struct *wait)
1040{ 1040{
1041 struct vivi_dev *dev = video_drvdata(file); 1041 struct vivi_dev *dev = video_drvdata(file);
1042 struct v4l2_fh *fh = file->private_data;
1043 struct vb2_queue *q = &dev->vb_vidq; 1042 struct vb2_queue *q = &dev->vb_vidq;
1044 unsigned int res;
1045 1043
1046 dprintk(dev, 1, "%s\n", __func__); 1044 dprintk(dev, 1, "%s\n", __func__);
1047 res = vb2_poll(q, file, wait); 1045 return vb2_poll(q, file, wait);
1048 if (v4l2_event_pending(fh))
1049 res |= POLLPRI;
1050 else
1051 poll_wait(file, &fh->wait, wait);
1052 return res;
1053} 1046}
1054 1047
1055static int vivi_close(struct file *file) 1048static int vivi_close(struct file *file)