diff options
Diffstat (limited to 'drivers/input/mouse/lifebook.c')
-rw-r--r-- | drivers/input/mouse/lifebook.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index c14395ba798..5e9d2506751 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c @@ -115,13 +115,15 @@ static int lifebook_absolute_mode(struct psmouse *psmouse) static void lifebook_set_resolution(struct psmouse *psmouse, unsigned int resolution) { - unsigned char params[] = { 0, 1, 2, 2, 3 }; + static const unsigned char params[] = { 0, 1, 2, 2, 3 }; + unsigned char p; if (resolution == 0 || resolution > 400) resolution = 400; - ps2_command(&psmouse->ps2dev, ¶ms[resolution / 100], PSMOUSE_CMD_SETRES); - psmouse->resolution = 50 << params[resolution / 100]; + p = params[resolution / 100]; + ps2_command(&psmouse->ps2dev, &p, PSMOUSE_CMD_SETRES); + psmouse->resolution = 50 << p; } static void lifebook_disconnect(struct psmouse *psmouse) |