Commit 1fce5019 authored by Peter Osterlund's avatar Peter Osterlund Committed by Vojtech Pavlik

synaptics.c, psmouse-base.c:

  input: Restore synaptics pad mode on module unload.
parent 3ad142f9
...@@ -478,9 +478,10 @@ static void psmouse_cleanup(struct serio *serio) ...@@ -478,9 +478,10 @@ static void psmouse_cleanup(struct serio *serio)
static void psmouse_disconnect(struct serio *serio) static void psmouse_disconnect(struct serio *serio)
{ {
struct psmouse *psmouse = serio->private; struct psmouse *psmouse = serio->private;
if (psmouse->type == PSMOUSE_SYNAPTICS)
synaptics_disconnect(psmouse);
input_unregister_device(&psmouse->dev); input_unregister_device(&psmouse->dev);
serio_close(serio); serio_close(serio);
synaptics_disconnect(psmouse);
kfree(psmouse); kfree(psmouse);
} }
......
...@@ -144,7 +144,7 @@ static int synaptics_enable_device(struct psmouse *psmouse) ...@@ -144,7 +144,7 @@ static int synaptics_enable_device(struct psmouse *psmouse)
static void print_ident(struct synaptics_data *priv) static void print_ident(struct synaptics_data *priv)
{ {
printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity)); printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity));
printk(KERN_INFO " Firware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity), printk(KERN_INFO " Firmware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity),
SYN_ID_MINOR(priv->identity)); SYN_ID_MINOR(priv->identity));
if (SYN_MODEL_ROT180(priv->model_id)) if (SYN_MODEL_ROT180(priv->model_id))
...@@ -228,7 +228,7 @@ int synaptics_init(struct psmouse *psmouse) ...@@ -228,7 +228,7 @@ int synaptics_init(struct psmouse *psmouse)
/* /*
* The x/y limits are taken from the Synaptics TouchPad interfacing Guide, * The x/y limits are taken from the Synaptics TouchPad interfacing Guide,
* which says that they should be valid regardless of the actual size of * which says that they should be valid regardless of the actual size of
* the senser. * the sensor.
*/ */
set_bit(EV_ABS, psmouse->dev.evbit); set_bit(EV_ABS, psmouse->dev.evbit);
set_abs_params(&psmouse->dev, ABS_X, 1472, 5472, 0, 0); set_abs_params(&psmouse->dev, ABS_X, 1472, 5472, 0, 0);
...@@ -259,6 +259,9 @@ void synaptics_disconnect(struct psmouse *psmouse) ...@@ -259,6 +259,9 @@ void synaptics_disconnect(struct psmouse *psmouse)
{ {
struct synaptics_data *priv = psmouse->private; struct synaptics_data *priv = psmouse->private;
/* Restore touchpad to power on default state */
synaptics_set_mode(psmouse, 0);
kfree(priv); kfree(priv);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment