diff options
author | Dima Zavin <dima@android.com> | 2011-12-13 01:20:04 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-01-09 10:46:46 +0800 |
commit | 9ee19b7b80176488e1e7050de54c9cdb6a98f25e (patch) | |
tree | e9e7fc7f2a7dd4e7257787be9163a31f339c86a5 /drivers/input | |
parent | 9df86827c50784818f6862482394c44f3925eed8 (diff) |
input: evdev: if no events and non-block, return EAGAIN not 0
Change-Id: I5f0da721f74e5de111cffc7e7b375b72dd80e530
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 13a741ae604..10ae1c966a3 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -426,6 +426,8 @@ static ssize_t evdev_read(struct file *file, char __user *buffer, retval += input_event_size(); } + if (retval == 0 && file->f_flags & O_NONBLOCK) + retval = -EAGAIN; return retval; } |