Patchwork [08/16] HID: fixed bug in single-touch emulation on the stantum panel

login
register
mail settings
Submitter Andy Whitcroft
Date March 30, 2010, 7:40 p.m.
Message ID <1269978023-3602-9-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/49020/
State Accepted
Delegated to: Andy Whitcroft
Headers show

Comments

Andy Whitcroft - March 30, 2010, 7:40 p.m.
From: Stephane Chatty <chatty@enac.fr>

Fixed stupid copy-paste bug in touchscreen emulation for the Stantum multitouch
panel: a flag was reset just before being tested.

Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit b32758c7216f337044ceb6dcaa754b8eda95a59f)

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/hid/hid-stantum.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/hid/hid-stantum.c b/drivers/hid/hid-stantum.c
index add965d..1b7b165 100644
--- a/drivers/hid/hid-stantum.c
+++ b/drivers/hid/hid-stantum.c
@@ -147,7 +147,6 @@  static void stantum_filter_event(struct stantum_data *sd,
 
 	input_mt_sync(input);
 	sd->valid = false;
-	sd->first = false;
 
 	/* touchscreen emulation */
 	if (sd->first) {
@@ -158,6 +157,7 @@  static void stantum_filter_event(struct stantum_data *sd,
 		input_event(input, EV_ABS, ABS_X, sd->x);
 		input_event(input, EV_ABS, ABS_Y, sd->y);
 	}
+	sd->first = false;
 }