Skip to content

Commit

Permalink
Input: serio_raw - really signal HUP upon disconnect
Browse files Browse the repository at this point in the history
Commit 8c1c10d 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>
  • Loading branch information
Dmitry Torokhov committed Jan 11, 2012
1 parent d89c9bc commit 0c62fbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/serio/serio_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 0c62fbf

Please sign in to comment.