]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
vivi: let vb2_poll handle events.
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 13 Jul 2011 09:28:27 +0000 (11:28 +0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 Nov 2011 19:26:52 +0000 (17:26 -0200)
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>
drivers/media/video/vivi.c

index 7d754fbcccbf78761b0185fdd2304513c70999af..45ddeb7bb60280dee88c1aa4cb9f378a22fdd018 100644 (file)
@@ -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)