aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 02:39:51 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 02:39:51 -0500
commitc611763d048990de5cdf848d97af6392f8fa7430 (patch)
tree751da02aaf502efd102ba66bd11054a45f18a03f /drivers/input/mouse
parent04df1925fcda9a35c716423ad2b73abd70eb0913 (diff)
Input: add ps2_drain() to libps2 to allow reading and discarding
given number of bytes from device. Change ps2_command to allow using 0 as command ID and actually pass it to the device instead of working as a drain. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/alps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 2679a165d39..ffdc8231319 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -270,7 +270,6 @@ static struct alps_model_info *alps_get_model(struct psmouse *psmouse, int *vers
static int alps_passthrough_mode(struct psmouse *psmouse, int enable)
{
struct ps2dev *ps2dev = &psmouse->ps2dev;
- unsigned char param[3];
int cmd = enable ? PSMOUSE_CMD_SETSCALE21 : PSMOUSE_CMD_SETSCALE11;
if (ps2_command(ps2dev, NULL, cmd) ||
@@ -280,7 +279,7 @@ static int alps_passthrough_mode(struct psmouse *psmouse, int enable)
return -1;
/* we may get 3 more bytes, just ignore them */
- ps2_command(ps2dev, param, 0x0300);
+ ps2_drain(ps2dev, 3, 100);
return 0;
}