Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210377
b: refs/heads/master
c: ba4d695
h: refs/heads/master
i:
  210375: 2917e0e
v: v3
  • Loading branch information
Henrik Rydberg authored and Dmitry Torokhov committed Aug 29, 2010
1 parent 4f131b7 commit b36e7d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c4e9671edfef534e9726366707d64e63d44e7e6
refs/heads/master: ba4d695a90c9176fca8e45d6c872bbf4e8bed315
11 changes: 9 additions & 2 deletions trunk/drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,11 +1599,14 @@ EXPORT_SYMBOL(input_free_device);
* @dev: input device supporting MT events and finger tracking
* @num_slots: number of slots used by the device
*
* This function allocates all necessary memory for MT slot handling
* in the input device, and adds ABS_MT_SLOT to the device capabilities.
* This function allocates all necessary memory for MT slot handling in the
* input device, and adds ABS_MT_SLOT to the device capabilities. All slots
* are initially marked as unused iby setting ABS_MT_TRACKING_ID to -1.
*/
int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots)
{
int i;

if (!num_slots)
return 0;

Expand All @@ -1614,6 +1617,10 @@ int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots)
dev->mtsize = num_slots;
input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0);

/* Mark slots as 'unused' */
for (i = 0; i < num_slots; i++)
dev->mt[i].abs[ABS_MT_TRACKING_ID - ABS_MT_FIRST] = -1;

return 0;
}
EXPORT_SYMBOL(input_mt_create_slots);
Expand Down

0 comments on commit b36e7d1

Please sign in to comment.