aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-07 11:13:50 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-06-02 12:00:08 +0200
commitbb94e3d4b31e0a30096dca1369ec8d5f48952647 (patch)
tree4eca23f612bbddf0570ae0e0bded2d1bba868d60
parent94c19a270cc3043a3b443cd7e0b97e7a2b38fa1a (diff)
cx231xx: improve epoll
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-417.c3
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-video.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 0f8ae81f4820..17edd03b54d6 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1839,10 +1839,9 @@ static __poll_t mpeg_poll(struct file *file,
struct cx231xx *dev = fh->dev;
__poll_t res = 0;
+ poll_wait(file, &fh->fh.wait, wait);
if (v4l2_event_pending(&fh->fh))
res |= EPOLLPRI;
- else
- poll_wait(file, &fh->fh.wait, wait);
if (!(req_events & (EPOLLIN | EPOLLRDNORM)))
return res;
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index f8820478d46b..f86983799578 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -2031,10 +2031,9 @@ static __poll_t cx231xx_v4l2_poll(struct file *filp, poll_table *wait)
if (unlikely(rc < 0))
return EPOLLERR;
+ poll_wait(filp, &fh->fh.wait, wait);
if (v4l2_event_pending(&fh->fh))
res |= EPOLLPRI;
- else
- poll_wait(filp, &fh->fh.wait, wait);
if (!(req_events & (EPOLLIN | EPOLLRDNORM)))
return res;

Privacy Policy