Input: elantech - reset the device when elantech probe fails

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 <hdegoede@redhat.com>
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Ulrik De Bie 2014-08-22 17:08:21 -07:00 committed by Dmitry Torokhov
parent a9e06219df
commit ac84eba220

View File

@ -1506,6 +1506,7 @@ int elantech_init(struct psmouse *psmouse)
return 0;
init_fail:
psmouse_reset(psmouse);
kfree(etd);
return -1;
}