diff options
-rw-r--r-- | drivers/input/mouse/olpc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/mouse/olpc.c b/drivers/input/mouse/olpc.c index f1b6ebafbfe2..d65d8015c7bd 100644 --- a/drivers/input/mouse/olpc.c +++ b/drivers/input/mouse/olpc.c @@ -205,6 +205,9 @@ static int hgpk_force_recalibrate(struct psmouse *psmouse) /* C-series touchpads added the recalibrate command */ if (psmouse->model < HGPK_MODEL_C) return 0; + + /* we don't want to race with the irq handler, nor with resyncs */ + psmouse_set_state(psmouse, PSMOUSE_INITIALIZING); /* start by resetting the device */ psmouse_reset(psmouse); @@ -229,6 +232,8 @@ static int hgpk_force_recalibrate(struct psmouse *psmouse) if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE)) return -1; + psmouse_set_state(psmouse, PSMOUSE_ACTIVATED); + /* * After we recalibrate, we shouldn't get any packets for 2s. If * we do, it's likely that someone's finger was on the touchpad. |