diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
commit | 0a7d5f8ce960e74fa22986bda4af488539796e49 (patch) | |
tree | e29ad17808a5c3410518e22dae8dfe94801b59f3 /drivers/input/evdev.c | |
parent | 0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff) | |
parent | dc709bd190c130b299ac19d596594256265c042a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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 | ||