summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/uinput.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-10-21 17:43:05 +0200
committerDavid S. Miller <davem@davemloft.net>2010-10-21 17:43:05 +0200
commit2198a10b501fd4443430cb17e065a9e859cc58c9 (patch)
tree87f3781d293da0f8f8f61615905eb7bf62b7c128 /drivers/input/misc/uinput.c
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/... (diff)
parentRevert d88dca79d3852a3623f606f781e013d61486828a (diff)
downloadlinux-2198a10b501fd4443430cb17e065a9e859cc58c9.tar.xz
linux-2198a10b501fd4443430cb17e065a9e859cc58c9.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/core/dev.c
Diffstat (limited to 'drivers/input/misc/uinput.c')
-rw-r--r--drivers/input/misc/uinput.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 0d4266a533a5..360698553eb5 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -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;