aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-11-27 04:50:54 -0500
committerHenrik Rydberg <rydberg@euromail.se>2010-12-16 04:41:12 -0500
commit8cde81001626c4c60b26ef2eb5fc522885ed9fd0 (patch)
tree9e9092cae44615376c5e3de98b8b259d137eb987 /drivers/input/misc
parent47c78e891323513e9909729b44033e2c6649e2b7 (diff)
input: mt: Collect slots initialization code
The MT slots devices all follow the same initialization pattern of creating slots and hinting about buffer size. Let drivers call an initialization function instead, and make sure it can be called repeatedly without side effects. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/uinput.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 8f374143190e..bea89722c4e9 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -407,8 +407,7 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu
407 goto exit; 407 goto exit;
408 if (test_bit(ABS_MT_SLOT, dev->absbit)) { 408 if (test_bit(ABS_MT_SLOT, dev->absbit)) {
409 int nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1; 409 int nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1;
410 input_mt_create_slots(dev, nslot); 410 input_mt_init_slots(dev, nslot);
411 input_set_events_per_packet(dev, 6 * nslot);
412 } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { 411 } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
413 input_set_events_per_packet(dev, 60); 412 input_set_events_per_packet(dev, 60);
414 } 413 }