diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-10 00:45:12 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-10 23:13:21 -0800 |
commit | 0c62fbf6009fa338bd28bdcb14efbfc5fc0c579b (patch) | |
tree | 9f36ade52c7004e7dc8adc61b10e4c5d596aa009 /drivers/input | |
parent | d89c9bcb33909568905ec9c4b44a18cd8bd88aaa (diff) | |
download | op-kernel-dev-0c62fbf6009fa338bd28bdcb14efbfc5fc0c579b.zip op-kernel-dev-0c62fbf6009fa338bd28bdcb14efbfc5fc0c579b.tar.gz |
Input: serio_raw - really signal HUP upon disconnect
Commit 8c1c10d5706bbb3b41cb4a5578339d67d3eeffc2 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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/serio/serio_raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index ca78a89..f6c83e9 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -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 = { |