diff mbox

patch for usbtouchscreen.c

Message ID 201002111132063289729@generaltouch.com (mailing list archive)
State New, archived
Headers show

Commit Message

yhch Feb. 11, 2010, 3:32 a.m. UTC
None
diff mbox

Patch

--- usbtouchscreen.c	2008-11-21 07:02:37.000000000 +0800
+++ usbtouchscreengt.c	2010-02-03 15:30:57.000000000 +0800
@@ -526,8 +526,8 @@ 
 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
 static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-	dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1] ;
-	dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3] ;
+	dev->x = ((pkt[2]) << 8) | pkt[1] ;
+	dev->y = ((pkt[4]) << 8) | pkt[3] ;
 	dev->press = pkt[5] & 0xff;
 	dev->touch = pkt[0] & 0x01;
 
@@ -669,9 +669,9 @@ 
 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
 	[DEVTYPE_GENERAL_TOUCH] = {
 		.min_xc		= 0x0,
-		.max_xc		= 0x0500,
+		.max_xc		= 0x0fff,
 		.min_yc		= 0x0,
-		.max_yc		= 0x0500,
+		.max_yc		= 0x0fff,
 		.rept_size	= 7,
 		.read_data	= general_touch_read_data,
 	},