From: Dmitry Torokhov Date: Tue, 15 Aug 2017 23:00:42 +0000 (-0700) Subject: Input: do not assign new tracking ID when changing tool type X-Git-Tag: android-x86-8.1-r1~82^2~25^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c258e84b180d38f76ab9962cf5bfc10720af1360;p=android-x86%2Fkernel.git Input: do not assign new tracking ID when changing tool type We allow changing tool type (from MT_TOOL_FINGER to MT_TOOL_PALM) so we should not be forcing new tracking ID for the slot. Acked-by: Benjamin Tissoires Reviewed-by: Peter Hutterer Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 8de52e3c00c0..4a69716e5461 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -153,7 +153,7 @@ bool input_mt_report_slot_state(struct input_dev *dev, } id = input_mt_get_value(slot, ABS_MT_TRACKING_ID); - if (id < 0 || input_mt_get_value(slot, ABS_MT_TOOL_TYPE) != tool_type) + if (id < 0) id = input_mt_new_trkid(mt); input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, id);