[PATCH] input-mt: Allow -1 for tracking id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In protocol B, the tracking ID can be set to -1. But since the min
value is set to 0, the clients don't receive a -1 when a contact is
lifted. The attached patch sets the min to -1 to fix this issue.

Cheers.
Sadrul
From dc5f39811bfd21409853fb4f5047f2ac47618c76 Mon Sep 17 00:00:00 2001
From: Sadrul Habib Chowdhury <sadrul@xxxxxxxxxxxx>
Date: Thu, 14 Apr 2011 17:42:27 -0400
Subject: [PATCH] input-mt: Allow -1 for tracking id.

The tracking id set to -1 when a slot is released. So allow the minimum
value to reach -1.

Change-Id: I8ffeaed70fd4824d5778ad2f2d7bc467157887fc

Signed-off-by: Sadrul Habib Chowdhury <sadrul@xxxxxxxxxxxx>
---
 drivers/input/input-mt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index c48c81f..5fb11e4 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -39,7 +39,7 @@ int input_mt_init_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);
-	input_set_abs_params(dev, ABS_MT_TRACKING_ID, 0, TRKID_MAX, 0, 0);
+	input_set_abs_params(dev, ABS_MT_TRACKING_ID, -1, TRKID_MAX, 0, 0);
 	input_set_events_per_packet(dev, 6 * num_slots);
 
 	/* Mark slots as 'unused' */
-- 
1.7.2.3


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux