aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/logips2pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/logips2pp.c')
-rw-r--r--drivers/input/mouse/logips2pp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c
index d3ddea26b8ca..9df74b72e6c4 100644
--- a/drivers/input/mouse/logips2pp.c
+++ b/drivers/input/mouse/logips2pp.c
@@ -200,6 +200,7 @@ static void ps2pp_disconnect(struct psmouse *psmouse)
200static const struct ps2pp_info *get_model_info(unsigned char model) 200static const struct ps2pp_info *get_model_info(unsigned char model)
201{ 201{
202 static const struct ps2pp_info ps2pp_list[] = { 202 static const struct ps2pp_info ps2pp_list[] = {
203 { 1, 0, 0 }, /* Simple 2-button mouse */
203 { 12, 0, PS2PP_SIDE_BTN}, 204 { 12, 0, PS2PP_SIDE_BTN},
204 { 13, 0, 0 }, 205 { 13, 0, 0 },
205 { 15, PS2PP_KIND_MX, /* MX1000 */ 206 { 15, PS2PP_KIND_MX, /* MX1000 */
@@ -338,12 +339,12 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
338 param[1] = 0; 339 param[1] = 0;
339 ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO); 340 ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
340 341
341 if (!param[1])
342 return -1;
343
344 model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78); 342 model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78);
345 buttons = param[1]; 343 buttons = param[1];
346 344
345 if (!model || !buttons)
346 return -1;
347
347 if ((model_info = get_model_info(model)) != NULL) { 348 if ((model_info = get_model_info(model)) != NULL) {
348 349
349/* 350/*