aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-07 11:13:14 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-06-02 12:00:06 +0200
commitdf94f41a373cd75772e8913d9099f4c3501e217b (patch)
treeae8b0deb066b422779b8b53f8d90f64645bef854
parent35a3a02f1a85129e1df015a79197321302b15d64 (diff)
tm6000: improve epoll
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/usb/tm6000/tm6000-video.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c
index 072210f5f92f..c269620b7030 100644
--- a/drivers/media/usb/tm6000/tm6000-video.c
+++ b/drivers/media/usb/tm6000/tm6000-video.c
@@ -1427,10 +1427,11 @@ __tm6000_poll(struct file *file, struct poll_table_struct *wait)
struct tm6000_buffer *buf;
__poll_t res = 0;
- if (v4l2_event_pending(&fh->fh))
- res = EPOLLPRI;
- else if (req_events & EPOLLPRI)
+ if (req_events & EPOLLPRI) {
poll_wait(file, &fh->fh.wait, wait);
+ if (v4l2_event_pending(&fh->fh))
+ res = EPOLLPRI;
+ }
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != fh->type)
return res | EPOLLERR;

Privacy Policy