diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-07-06 04:22:43 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-07-06 04:22:43 (GMT) |
commit | 0e739d28762e78c746cad8edd33223550a1c6a3f (patch) | |
tree | 6fa695c3076b737b7b1848d81d75095400821e31 /drivers/input/evdev.c | |
parent | c7e8dc6ee6d59bf72f5478fa6355a27750e6c7d2 (diff) | |
download | linux-0e739d28762e78c746cad8edd33223550a1c6a3f.tar.xz |
Input: introduce input_inject_event() function
Create input_inject_event() function which is to be used by input
handlers as opposed to input_event() which is reserved for drivers
implementing input devices. The difference is that if device is
"grabbed" by some process input_inject_event() will ignore events
unless sent from the handle that is currently owns the device.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 2426a5d..4bf4818 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -256,7 +256,7 @@ static ssize_t evdev_write(struct file * file, const char __user * buffer, size_ if (evdev_event_from_user(buffer + retval, &event)) return -EFAULT; - input_event(list->evdev->handle.dev, event.type, event.code, event.value); + input_inject_event(&list->evdev->handle, event.type, event.code, event.value); retval += evdev_event_size(); } @@ -424,8 +424,8 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd, if (get_user(v, ip + 1)) return -EFAULT; - input_event(dev, EV_REP, REP_DELAY, u); - input_event(dev, EV_REP, REP_PERIOD, v); + input_inject_event(&evdev->handle, EV_REP, REP_DELAY, u); + input_inject_event(&evdev->handle, EV_REP, REP_PERIOD, v); return 0; |