Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202218
b: refs/heads/master
c: c18fb13
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Jul 16, 2010
1 parent ac49328 commit d135987
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d4bf995ea873cc213c5abc5402af46ef490b8fd
refs/heads/master: c18fb1396eb809dbc16e51da273a1789f9d799bf
9 changes: 7 additions & 2 deletions trunk/drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d135987

Please sign in to comment.