From patchwork Sun Mar 28 20:15:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 88815 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 o2SKG9Uu017966 for ; Sun, 28 Mar 2010 20:16:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755227Ab0C1UPw (ORCPT ); Sun, 28 Mar 2010 16:15:52 -0400 Received: from mail1-out1.atlantis.sk ([80.94.52.55]:37676 "EHLO mail.atlantis.sk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755218Ab0C1UPu (ORCPT ); Sun, 28 Mar 2010 16:15:50 -0400 Received: (qmail 7613 invoked from network); 28 Mar 2010 20:15:51 -0000 Received: from unknown (HELO pentium) (rainbow@rainbow-software.org@85.216.180.141) by mail.atlantis.sk with AES256-SHA encrypted SMTP; 28 Mar 2010 20:15:51 -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: Sun, 28 Mar 2010 22:15:38 +0200 MIME-Version: 1.0 Message-Id: <201003282215.41522.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]); Sun, 28 Mar 2010 20:16:10 +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,