diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:50:23 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:50:23 -0400 |
| commit | aad61439e6a00bdb72cb649e11f6e166590c5f66 (patch) | |
| tree | 2279f3c2a15f81526d14182c6acb358cafd0b359 /drivers/input/evdev.c | |
| parent | 3c304956755fa63ee80ca51ce38078fe1c4e8818 (diff) | |
| parent | d98550e334715b2d9e45f8f0f4e1608720108640 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'drivers/input/evdev.c')
| -rw-r--r-- | drivers/input/evdev.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index a34e3d91d9ed..ba325f16d077 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -403,6 +403,27 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd, case EVIOCGID: if (copy_to_user(p, &dev->id, sizeof(struct input_id))) return -EFAULT; + return 0; + + case EVIOCGREP: + if (!test_bit(EV_REP, dev->evbit)) + return -ENOSYS; + if (put_user(dev->rep[REP_DELAY], ip)) + return -EFAULT; + if (put_user(dev->rep[REP_PERIOD], ip + 1)) + return -EFAULT; + return 0; + + case EVIOCSREP: + if (!test_bit(EV_REP, dev->evbit)) + return -ENOSYS; + if (get_user(u, ip)) + return -EFAULT; + if (get_user(v, ip + 1)) + return -EFAULT; + + input_event(dev, EV_REP, REP_DELAY, u); + input_event(dev, EV_REP, REP_PERIOD, v); return 0; |
