Cc: Jeff Brown <jeffbrown@xxxxxxxxxxx> Signed-off-by: Dima Zavin <dima@xxxxxxxxxxx> --- 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 03344b3..2e563af 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -412,6 +412,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; } -- 1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html