diff options
author | Dima Zavin <dima@android.com> | 2011-12-30 18:16:44 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-30 18:26:35 -0500 |
commit | e90f869cae3b4aedf0f6d2ca8048d60245ee77f7 (patch) | |
tree | 9afd751f1f9bdbd2623e065054aafc8cdfdb41eb /drivers/input | |
parent | 566cf5b6e34504aaccb76167ecccd7e7e69e6456 (diff) |
Input: evdev - if no events and non-block, return EAGAIN not 0
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 03344b3c7c1..a9d871651ce 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -412,6 +412,9 @@ static ssize_t evdev_read(struct file *file, char __user *buffer, | |||
412 | retval += input_event_size(); | 412 | retval += input_event_size(); |
413 | } | 413 | } |
414 | 414 | ||
415 | if (retval == 0 && (file->f_flags & O_NONBLOCK)) | ||
416 | return -EAGAIN; | ||
417 | |||
415 | return retval; | 418 | return retval; |
416 | } | 419 | } |
417 | 420 | ||