diff options
author | Dima Zavin <dima@android.com> | 2011-10-04 22:31:48 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-10-04 22:51:03 -0700 |
commit | 587b1eb1629612189c8b278d4efee952bcf73b4f (patch) | |
tree | dc288d0cd9e342b31a60f1059f9aca8c2dfd6d2a /drivers/input | |
parent | 487319375187798f489ade0c4df1f14dc43aff63 (diff) | |
download | kernel_samsung_tuna-587b1eb1629612189c8b278d4efee952bcf73b4f.zip kernel_samsung_tuna-587b1eb1629612189c8b278d4efee952bcf73b4f.tar.gz kernel_samsung_tuna-587b1eb1629612189c8b278d4efee952bcf73b4f.tar.bz2 |
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 13a741a..10ae1c9 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; } |