Skip to contentSkip to conversation

PATCH] usbtouchscreen: fix ITM data reading

PATCH Daniel Ritz 2 participants 2 messages Sep 7, 2006 USB

lore
Share & tools
lore
#0 lore raw

before 2.6.19, please :)

[PATCH] usbtouchscreen: fix ITM data reading

From: Kai Lindhom <[email protected]>

drivers/usb/input/usbtouchscreen.c +1 -1
index 3b175aa..a338bf4 100644
@@ -286,7 +286,7 @@ #ifdef CONFIG_USB_TOUCHSCREEN_ITM
 static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
 {
 	*x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F);
-	*x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
+	*y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
 	*press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F);
 	*touch = ~pkt[7] & 0x20;
 
#1 lore raw
Quoted 7 lines · Daniel Ritz

before 2.6.19, please :)

[PATCH] usbtouchscreen: fix ITM data reading

From: Kai Lindhom <[email protected]>

Greg, will you push it through your tree?

Quoted 14 lines
drivers/usb/input/usbtouchscreen.c +1 -1
index 3b175aa..a338bf4 100644
@@ -286,7 +286,7 @@ #ifdef CONFIG_USB_TOUCHSCREEN_ITM
 static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
 {
 	*x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F);
-	*x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
+	*y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
 	*press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F);
 	*touch = ~pkt[7] & 0x20;
 
Signature · 1 line
Dmitry