projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d4bf99
)
Input: evdev - signal that device is writable in evdev_poll()
author
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Fri, 16 Jul 2010 06:28:42 +0000
(23:28 -0700)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Fri, 16 Jul 2010 06:53:00 +0000
(23:53 -0700)
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/evdev.c
patch
|
blob
|
history
diff --git
a/drivers/input/evdev.c
b/drivers/input/evdev.c
index 70c0eb52ca96219291d936fc40a9d3f4414e09c6..054edf346e0b5f060e352572f473244e4aeeadcb 100644
(file)
--- a/
drivers/input/evdev.c
+++ b/
drivers/input/evdev.c
@@
-403,10
+403,15
@@
static unsigned int evdev_poll(struct file *file, poll_table *wait)
{
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
+ unsigned int mask;
poll_wait(file, &evdev->wait, wait);
- return ((client->head == client->tail) ? 0 : (POLLIN | POLLRDNORM)) |
- (evdev->exist ? 0 : (POLLHUP | POLLERR));
+
+ mask = evdev->exist ? POLLOUT | POLLWRNORM : POLLHUP | POLLERR;
+ if (client->head != client->tail)
+ mask |= POLLIN | POLLRDNORM;
+
+ return mask;
}
#ifdef CONFIG_COMPAT