From 668fce082e1ceaf3eb2881a502d9b53804f33ce9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Wed, 30 Nov 2011 19:41:47 +0800 Subject: [PATCH] input: eeti_egalax_i2c: never report ABS_MT_TOUCH_MAJOR with 0 --- drivers/input/touchscreen/eeti_egalax_i2c.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/eeti_egalax_i2c.c b/drivers/input/touchscreen/eeti_egalax_i2c.c index af0c5f0ed8e4..8177406c9373 100755 --- a/drivers/input/touchscreen/eeti_egalax_i2c.c +++ b/drivers/input/touchscreen/eeti_egalax_i2c.c @@ -371,21 +371,20 @@ static void ProcessReport(unsigned char *buf, int buflen) { for(i=0; i= 0) + if(PointBuf[i].Status > 0) { input_mt_slot(input_dev, i); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, true); input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, PointBuf[i].Status); input_report_abs(input_dev, ABS_MT_POSITION_X, PointBuf[i].X); input_report_abs(input_dev, ABS_MT_POSITION_Y, PointBuf[i].Y); - - if(PointBuf[i].Status == 0) - PointBuf[i].Status--; + PointBuf[i].Status = 0; } - else + else if (PointBuf[i].Status == 0) { input_mt_slot(input_dev, i); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, false); + PointBuf[i].Status = -1; } } input_sync(input_dev); @@ -505,10 +504,11 @@ static void egalax_i2c_wq(struct work_struct *work) input_report_abs(input_dev, ABS_MT_POSITION_Y, PointBuf[i].Y); PointBuf[i].Status = 0; } - else + else if (PointBuf[i].Status == 0) { input_mt_slot(input_dev, i); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, false); + PointBuf[i].Status = -1; } } input_sync(input_dev); -- 2.34.1