From patchwork Thu May 28 16:29:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Herkt X-Patchwork-Id: 6499991 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4621DC0020 for ; Thu, 28 May 2015 16:38:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 699552075F for ; Thu, 28 May 2015 16:38:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2621820755 for ; Thu, 28 May 2015 16:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754106AbbE1Qia (ORCPT ); Thu, 28 May 2015 12:38:30 -0400 Received: from srsfckn.biz ([148.251.137.227]:46637 "EHLO srsfckn.biz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752810AbbE1Qia (ORCPT ); Thu, 28 May 2015 12:38:30 -0400 X-Greylist: delayed 482 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 May 2015 12:38:29 EDT Received: from Sakuya.Gensokyo (dslb-088-068-164-236.088.068.pools.vodafone-ip.de [88.68.164.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by srsfckn.biz (Postfix) with ESMTPSA id 688051917612; Thu, 28 May 2015 18:30:10 +0200 (CEST) From: Martin Herkt To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Hans de Goede , Ulrik De Bie , George Moutsopoulos , Martin Herkt Subject: [PATCH] input: elantech.c: add more exceptions to fw version signature check Date: Thu, 28 May 2015 18:29:30 +0200 Message-Id: <1432830570-31406-1-git-send-email-lachs0r@srsfckn.biz> X-Mailer: git-send-email 2.3.5 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, FROM_DOMAIN_NOVOWEL, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This makes the driver work with the ElanTech touchpad of my ASUS PU551LD laptop (fw signature 0x480f0a). There may be more touchpads with firmware versions in the 0x4? range, so I've added those to the exception as well. Signed-off-by: Martin Herkt --- drivers/input/mouse/elantech.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 79363b6..cd3e2a3 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1379,7 +1379,8 @@ static bool elantech_is_signature_valid(const unsigned char *param) * Some models have a revision higher then 20. Meaning param[2] may * be 10 or 20, skip the rates check for these. */ - if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40) + if (param[0] >= 0x40 && param[0] < 0x50 && + (param[1] & 0xef) == 0x0f && param[2] < 40) return true; for (i = 0; i < ARRAY_SIZE(rates); i++)