aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r--drivers/input/mouse/psmouse-base.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index cbc807264940..a3c97315a473 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -1394,6 +1394,7 @@ static int psmouse_reconnect(struct serio *serio)
1394 struct psmouse *psmouse = serio_get_drvdata(serio); 1394 struct psmouse *psmouse = serio_get_drvdata(serio);
1395 struct psmouse *parent = NULL; 1395 struct psmouse *parent = NULL;
1396 struct serio_driver *drv = serio->drv; 1396 struct serio_driver *drv = serio->drv;
1397 unsigned char type;
1397 int rc = -1; 1398 int rc = -1;
1398 1399
1399 if (!drv || !psmouse) { 1400 if (!drv || !psmouse) {
@@ -1413,10 +1414,15 @@ static int psmouse_reconnect(struct serio *serio)
1413 if (psmouse->reconnect) { 1414 if (psmouse->reconnect) {
1414 if (psmouse->reconnect(psmouse)) 1415 if (psmouse->reconnect(psmouse))
1415 goto out; 1416 goto out;
1416 } else if (psmouse_probe(psmouse) < 0 || 1417 } else {
1417 psmouse->type != psmouse_extensions(psmouse, 1418 psmouse_reset(psmouse);
1418 psmouse_max_proto, false)) { 1419
1419 goto out; 1420 if (psmouse_probe(psmouse) < 0)
1421 goto out;
1422
1423 type = psmouse_extensions(psmouse, psmouse_max_proto, false);
1424 if (psmouse->type != type)
1425 goto out;
1420 } 1426 }
1421 1427
1422 /* ok, the device type (and capabilities) match the old one, 1428 /* ok, the device type (and capabilities) match the old one,