From patchwork Wed Aug 20 18:18:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrik De Bie X-Patchwork-Id: 4753261 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5B2BC0338 for ; Wed, 20 Aug 2014 18:57:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00A6B2015A for ; Wed, 20 Aug 2014 18:57:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2B0520122 for ; Wed, 20 Aug 2014 18:57:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbaHTS5T (ORCPT ); Wed, 20 Aug 2014 14:57:19 -0400 Received: from e2big.org ([198.61.226.133]:52598 "EHLO e2big.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbaHTS5S (ORCPT ); Wed, 20 Aug 2014 14:57:18 -0400 X-Greylist: delayed 2276 seconds by postgrey-1.27 at vger.kernel.org; Wed, 20 Aug 2014 14:57:18 EDT Received: from 78-23-174-213.access.telenet.be ([78.23.174.213] helo=lantern.debie) by e2big.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XKATs-0000HW-7M; Wed, 20 Aug 2014 20:19:32 +0200 From: Ulrik De Bie To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Hans de Goede , David Herrmann , ulrik.debie-os@e2big.org Subject: [PATCH RESEND v4 2/2] elantech: Call psmouse_reset when elantech probe fails Date: Wed, 20 Aug 2014 20:18:12 +0200 Message-Id: <1408558692-11736-3-git-send-email-ulrik.debie-os@e2big.org> X-Mailer: git-send-email 2.1.0.rc1 In-Reply-To: <1408558692-11736-1-git-send-email-ulrik.debie-os@e2big.org> References: <1408558692-11736-1-git-send-email-ulrik.debie-os@e2big.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 elantech_init() calls elantech_set_absolute_mode which sets the driver in an absolute mode. When after this the elantech_init fails, it is best to turn the ps/2 mouse emulation mode back on by calling psmouse_reset() so that it can work as a regular mouse. Reviewed-by: Hans de Goede Signed-off-by: Ulrik De Bie --- drivers/input/mouse/elantech.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 5dd620a..771291c 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1620,6 +1620,7 @@ int elantech_init(struct psmouse *psmouse) sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, &elantech_attr_group); init_fail: + psmouse_reset(psmouse); kfree(etd); return error; }