diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2012-08-11 16:07:55 -0400 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2012-09-19 13:50:18 -0400 |
commit | b4adbbefc2099476a4f1020041c99f52cf3cd67d (patch) | |
tree | ba9ca0069c7375a99fa0a9f2728b445f3ae5a096 /drivers/input/input-mt.c | |
parent | a274ac15ed069bae4118e3251359240379b6801b (diff) |
Input: MT - Add flags to input_mt_init_slots()
Preparing to move more repeated code into the mt core, add a flags
argument to the input_mt_slots_init() function.
Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/input/input-mt.c')
-rw-r--r-- | drivers/input/input-mt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 6020d06652a8..1985f27f427a 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c | |||
@@ -25,7 +25,8 @@ | |||
25 | * May be called repeatedly. Returns -EINVAL if attempting to | 25 | * May be called repeatedly. Returns -EINVAL if attempting to |
26 | * reinitialize with a different number of slots. | 26 | * reinitialize with a different number of slots. |
27 | */ | 27 | */ |
28 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots) | 28 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, |
29 | unsigned int flags) | ||
29 | { | 30 | { |
30 | struct input_mt *mt = dev->mt; | 31 | struct input_mt *mt = dev->mt; |
31 | int i; | 32 | int i; |
@@ -40,6 +41,7 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots) | |||
40 | return -ENOMEM; | 41 | return -ENOMEM; |
41 | 42 | ||
42 | mt->num_slots = num_slots; | 43 | mt->num_slots = num_slots; |
44 | mt->flags = flags; | ||
43 | input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0); | 45 | input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0); |
44 | input_set_abs_params(dev, ABS_MT_TRACKING_ID, 0, TRKID_MAX, 0, 0); | 46 | input_set_abs_params(dev, ABS_MT_TRACKING_ID, 0, TRKID_MAX, 0, 0); |
45 | 47 | ||