Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282415
b: refs/heads/master
c: 509f87c
h: refs/heads/master
i:
  282413: 47ceeb4
  282411: ec5d76f
  282407: 67fd7d8
  282399: 269b66d
v: v3
  • Loading branch information
Dima Zavin authored and Dmitry Torokhov committed Dec 30, 2011
1 parent 85dbe45 commit 4c72db1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: e90f869cae3b4aedf0f6d2ca8048d60245ee77f7
refs/heads/master: 509f87c5f564627b6b9fc763e74ef3608213d610
15 changes: 7 additions & 8 deletions trunk/drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,13 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
if (count < input_event_size())
return -EINVAL;

if (client->packet_head == client->tail && evdev->exist &&
(file->f_flags & O_NONBLOCK))
return -EAGAIN;

retval = wait_event_interruptible(evdev->wait,
client->packet_head != client->tail || !evdev->exist);
if (retval)
return retval;
if (!(file->f_flags & O_NONBLOCK)) {
retval = wait_event_interruptible(evdev->wait,
client->packet_head != client->tail ||
!evdev->exist);
if (retval)
return retval;
}

if (!evdev->exist)
return -ENODEV;
Expand Down

0 comments on commit 4c72db1

Please sign in to comment.