From: Hans Verkuil Date: Wed, 13 Jul 2011 09:28:27 +0000 (+0200) Subject: vivi: let vb2_poll handle events. X-Git-Tag: next-20111110~39^2^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b49aca420583ded64a782770fae095d0c2d71ff4;p=karo-tx-linux.git 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: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 7d754fbcccbf..45ddeb7bb602 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1057,17 +1057,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)