Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09494d5d authored by Kai Lindhom's avatar Kai Lindhom Committed by Greg Kroah-Hartman
Browse files

usbtouchscreen: fix ITM data reading



From: Kai Lindhom <megantti@gmail.com>
Signed-off-by: default avatarDaniel Ritz <daniel.ritz@gmx.ch>
Acked-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent eaede2cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -286,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)
static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
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[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);
	*press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F);
	*touch = ~pkt[7] & 0x20;
	*touch = ~pkt[7] & 0x20;