From: Ulrik De Bie Date: Sat, 23 Aug 2014 00:08:21 +0000 (-0700) Subject: Input: elantech - reset the device when elantech probe fails X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ac84eba220c401f7616237ee6e5b73f66afb3590;p=linux-beck.git 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 Signed-off-by: Ulrik De Bie Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index ee2a04d90d20..15c5f304f7e7 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1506,6 +1506,7 @@ int elantech_init(struct psmouse *psmouse) return 0; init_fail: + psmouse_reset(psmouse); kfree(etd); return -1; }