diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-12-01 15:44:45 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-04 15:16:28 +0300 |
commit | 5cb0a64effe7608d6fd46f5be3106b1b73300621 (patch) | |
tree | 7de3272dfafd1afa497ef2810db4e79f64b43b7c /drivers/staging/media | |
parent | b996922bed2c506dce3eef087b87e0eda8bcc170 (diff) | |
download | linux-5cb0a64effe7608d6fd46f5be3106b1b73300621.tar.xz |
media: v4l2-dev: add EPOLLPRI in v4l2_poll() when dev is unregistered
If the V4L2 device was unregistered, then add EPOLLPRI to
the poll mask. Otherwise a select() that only waits for
exceptions will not wake up. A select() that waits for
read and/or write events *will* wake up on an EPOLLERR, but
not (for some reason) if it just waits for exceptions.
Strangly the epoll functionality will wakeup on EPOLLERR if
you just wait for an exception, so in this respect select()
and epoll differ.
In the end it doesn't really matter, what matters is that
polling file handles are woken up on device unregistration.
It also improves the code a bit if vdev->fops->poll is NULL:
this didn't check for device unregistration.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media')
0 files changed, 0 insertions, 0 deletions