From 0bf0f713d6e6b9f1c510d598c29ac17812a4eea5 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 13 Jul 2011 04:28:27 -0300 Subject: [PATCH] [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 Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/vivi.c | 9 +-------- 1 file changed, 1 insertion(+), 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 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) -- 2.30.2