]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/input/misc/uinput.c
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[net-next-2.6.git] / drivers / input / misc / uinput.c
index 0d4266a533a524564adcc85cc546736248753628..b9410784e6a1f1503fb57a720c9f91b1fcec2fce 100644 (file)
@@ -404,6 +404,13 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu
                retval = uinput_validate_absbits(dev);
                if (retval < 0)
                        goto exit;
+               if (test_bit(ABS_MT_SLOT, dev->absbit)) {
+                       int nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1;
+                       input_mt_create_slots(dev, nslot);
+                       input_set_events_per_packet(dev, 6 * nslot);
+               } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
+                       input_set_events_per_packet(dev, 60);
+               }
        }
 
        udev->state = UIST_SETUP_COMPLETE;
@@ -804,6 +811,7 @@ static const struct file_operations uinput_fops = {
 #ifdef CONFIG_COMPAT
        .compat_ioctl   = uinput_compat_ioctl,
 #endif
+       .llseek         = no_llseek,
 };
 
 static struct miscdevice uinput_misc = {