diff options
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index a29d5ceb00cf..4bf48188cc91 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -127,14 +127,10 @@ static int evdev_open(struct inode * inode, struct file * file) | |||
127 | { | 127 | { |
128 | struct evdev_list *list; | 128 | struct evdev_list *list; |
129 | int i = iminor(inode) - EVDEV_MINOR_BASE; | 129 | int i = iminor(inode) - EVDEV_MINOR_BASE; |
130 | int accept_err; | ||
131 | 130 | ||
132 | if (i >= EVDEV_MINORS || !evdev_table[i] || !evdev_table[i]->exist) | 131 | if (i >= EVDEV_MINORS || !evdev_table[i] || !evdev_table[i]->exist) |
133 | return -ENODEV; | 132 | return -ENODEV; |
134 | 133 | ||
135 | if ((accept_err = input_accept_process(&(evdev_table[i]->handle), file))) | ||
136 | return accept_err; | ||
137 | |||
138 | if (!(list = kzalloc(sizeof(struct evdev_list), GFP_KERNEL))) | 134 | if (!(list = kzalloc(sizeof(struct evdev_list), GFP_KERNEL))) |
139 | return -ENOMEM; | 135 | return -ENOMEM; |
140 | 136 | ||
@@ -260,7 +256,7 @@ static ssize_t evdev_write(struct file * file, const char __user * buffer, size_ | |||
260 | 256 | ||
261 | if (evdev_event_from_user(buffer + retval, &event)) | 257 | if (evdev_event_from_user(buffer + retval, &event)) |
262 | return -EFAULT; | 258 | return -EFAULT; |
263 | input_event(list->evdev->handle.dev, event.type, event.code, event.value); | 259 | input_inject_event(&list->evdev->handle, event.type, event.code, event.value); |
264 | retval += evdev_event_size(); | 260 | retval += evdev_event_size(); |
265 | } | 261 | } |
266 | 262 | ||
@@ -428,8 +424,8 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd, | |||
428 | if (get_user(v, ip + 1)) | 424 | if (get_user(v, ip + 1)) |
429 | return -EFAULT; | 425 | return -EFAULT; |
430 | 426 | ||
431 | input_event(dev, EV_REP, REP_DELAY, u); | 427 | input_inject_event(&evdev->handle, EV_REP, REP_DELAY, u); |
432 | input_event(dev, EV_REP, REP_PERIOD, v); | 428 | input_inject_event(&evdev->handle, EV_REP, REP_PERIOD, v); |
433 | 429 | ||
434 | return 0; | 430 | return 0; |
435 | 431 | ||