mirror of
https://github.com/torvalds/linux.git
synced 2024-11-20 11:01:38 +00:00
Input: serio_raw - really signal HUP upon disconnect
Commit 8c1c10d570
attempted to signal
POLLHUP | POLLERR condition when polling disconnected device,
unfortunately it did not do it quite correctly.
Reported-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
d89c9bcb33
commit
0c62fbf600
@ -237,9 +237,9 @@ static unsigned int serio_raw_poll(struct file *file, poll_table *wait)
|
||||
|
||||
mask = serio_raw->dead ? POLLHUP | POLLERR : POLLOUT | POLLWRNORM;
|
||||
if (serio_raw->head != serio_raw->tail)
|
||||
return POLLIN | POLLRDNORM;
|
||||
mask |= POLLIN | POLLRDNORM;
|
||||
|
||||
return 0;
|
||||
return mask;
|
||||
}
|
||||
|
||||
static const struct file_operations serio_raw_fops = {
|
||||
|
Loading…
Reference in New Issue
Block a user