[PATCH natty,oneiric] UBUNTU: SAUCE: Unregister input device only if it is registered

Jesse Sung jesse.sung at canonical.com
Mon Sep 19 01:25:14 UTC 2011


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 <jesse.sung at canonical.com>
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 <jesse.sung at canonical.com>
---
  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);
  }

-- 
1.7.5.4





More information about the kernel-team mailing list