From f9ce6eb5b6fa8cbcf0a0fb7c5f4203f94730fc52 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 18 Oct 2010 08:43:50 -0700 Subject: [PATCH] Input: evdev - fix EVIOCSABS regression 448cd16 ("Input: evdev - rearrange ioctl handling") broke EVIOCSABS by checking for the wrong direction bit. Signed-off-by: Daniel Mack Reported-by: Sven Neumann Tested-by: Sven Neumann Signed-off-by: Dmitry Torokhov --- drivers/input/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index afb64cf3748dd..9ddafc30f4322 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -683,7 +683,7 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd, } } - if (_IOC_DIR(cmd) == _IOC_READ) { + if (_IOC_DIR(cmd) == _IOC_WRITE) { if ((_IOC_NR(cmd) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) {