mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: [media] lirc_dev: return POLLHUP and POLLERR when device is gone
Most drivers return both values when the device is gone.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 29debf3d9d)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
010d96e694
commit
d928794b66
@@ -376,7 +376,7 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
|
||||
}
|
||||
|
||||
if (!ir->attached)
|
||||
return POLLERR;
|
||||
return POLLHUP | POLLERR;
|
||||
|
||||
if (ir->buf) {
|
||||
poll_wait(file, &ir->buf->wait_poll, wait);
|
||||
|
||||
Reference in New Issue
Block a user