aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-07 11:13:36 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-06-02 12:00:07 +0200
commit94c19a270cc3043a3b443cd7e0b97e7a2b38fa1a (patch)
tree8b244fb490b133c2ced9c98a9acad5b0f4c476a7
parentdf94f41a373cd75772e8913d9099f4c3501e217b (diff)
pvrusb2: improve epoll
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/usb/pvrusb2/pvrusb2-v4l2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
index cb6668580d77..66c6d5d037b9 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
@@ -1162,6 +1162,7 @@ static __poll_t pvr2_v4l2_poll(struct file *file, poll_table *wait)
struct pvr2_v4l2_fh *fh = file->private_data;
int ret;
+ poll_wait(file, &fh->wait_data, wait);
if (fh->fw_mode_flag) {
mask |= EPOLLIN | EPOLLRDNORM;
return mask;
@@ -1172,11 +1173,8 @@ static __poll_t pvr2_v4l2_poll(struct file *file, poll_table *wait)
if (ret) return EPOLLERR;
}
- poll_wait(file,&fh->wait_data,wait);
-
- if (pvr2_ioread_avail(fh->rhp) >= 0) {
+ if (pvr2_ioread_avail(fh->rhp) >= 0)
mask |= EPOLLIN | EPOLLRDNORM;
- }
return mask;
}

Privacy Policy