From patchwork Mon Sep 19 01:25:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 115283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id AC591B70ED for ; Mon, 19 Sep 2011 11:25:37 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1R5Sbq-0002hj-72; Mon, 19 Sep 2011 01:25:22 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1R5Sbn-0002he-Et for kernel-team@lists.ubuntu.com; Mon, 19 Sep 2011 01:25:19 +0000 Received: from 112-104-199-241.adsl.dynamic.seed.net.tw ([112.104.199.241]) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1R5Sbn-0004qy-3m for kernel-team@lists.ubuntu.com; Mon, 19 Sep 2011 01:25:19 +0000 Message-ID: <4E7699FA.20202@canonical.com> Date: Mon, 19 Sep 2011 09:25:14 +0800 From: Jesse Sung User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Icedove/3.1.13 MIME-Version: 1.0 To: kernel-team@lists.ubuntu.com Subject: [PATCH natty,oneiric] UBUNTU: SAUCE: Unregister input device only if it is registered X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com https://bugs.launchpad.net/bugs/839238 SRU Justification: Using an ALPS touchpad in the quirk list makes unloading psmouse.ko hang the system. Also, due to the protocol problem of ALPS touchpad, the disconnect function would be called when system is running, and cause a random hang. Fix: From e14874429daac619a2bea5030494ffd68230bfa1 Mon Sep 17 00:00:00 2001 From: Wen-chien Jesse Sung Date: Fri, 16 Sep 2011 15:20:22 +0800 Subject: [PATCH] UBUNTU: SAUCE: Unregister input device only if it is registered BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/839238 dev2 is not registered in alps_model_quirk_enabled mode, do not unregister while disconnecting. Signed-off-by: Wen-chien Jesse Sung Acked-by: Tim Gardner Acked-by: Seth Forshee Signed-off-by: Leann Ogasawara --- drivers/input/mouse/alps.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index da20b62..9adff60 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -745,7 +745,8 @@ static void alps_disconnect(struct psmouse *psmouse) psmouse_reset(psmouse); del_timer_sync(&priv->timer); - input_unregister_device(priv->dev2); + if (!alps_model_quirk_enabled) + input_unregister_device(priv->dev2); kfree(priv); }