From patchwork Mon Mar 22 13:29:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 87428 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2MDUGVU020356 for ; Mon, 22 Mar 2010 13:30:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754289Ab0CVN3e (ORCPT ); Mon, 22 Mar 2010 09:29:34 -0400 Received: from mail1-out1.atlantis.sk ([80.94.52.55]:52493 "EHLO mail.atlantis.sk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754195Ab0CVN31 (ORCPT ); Mon, 22 Mar 2010 09:29:27 -0400 Received: (qmail 28560 invoked from network); 22 Mar 2010 13:29:25 -0000 Received: from unknown (HELO omega.fornet.sk) (rainbow@rainbow-software.org@62.176.172.51) by mail.atlantis.sk with AES256-SHA encrypted SMTP; 22 Mar 2010 13:29:25 -0000 To: Oliver Neukum Subject: [PATCH] [resend] usbtouchscreen: support bigger iNexio touchscreens Cc: linux-usb@vger.kernel.org, daniel.ritz@gmx.ch, linux-kernel@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org Content-Disposition: inline From: Ondrej Zary Date: Mon, 22 Mar 2010 14:29:20 +0100 MIME-Version: 1.0 Message-Id: <201003221429.21723.linux@rainbow-software.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 22 Mar 2010 13:30:37 +0000 (UTC) --- linux-2.6.34-rc1-orig/drivers/input/touchscreen/usbtouchscreen.c 2010-03-16 13:34:51.000000000 +0100 +++ linux-2.6.34-rc1/drivers/input/touchscreen/usbtouchscreen.c 2010-03-16 13:46:15.000000000 +0100 @@ -858,6 +858,11 @@ if ((pkt[0] & 0xe0) != 0xe0) return 0; + if (be16_to_cpu(packet->data_len) > 0xff) + packet->data_len = cpu_to_be16(be16_to_cpu(packet->data_len) - 0x100); + if (be16_to_cpu(packet->x_len) > 0xff) + packet->x_len = cpu_to_be16(be16_to_cpu(packet->x_len) - 0x80); + /* send ACK */ ret = usb_submit_urb(priv->ack, GFP_ATOMIC); @@ -1113,7 +1118,7 @@ #ifdef CONFIG_TOUCHSCREEN_USB_NEXIO [DEVTYPE_NEXIO] = { - .rept_size = 128, + .rept_size = 1024, .irq_always = true, .read_data = nexio_read_data, .init = nexio_init,