Commit d18e53fc authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Dmitry Torokhov

Input: ALPS - remove unused argument to alps_enter_command_mode()

Now that alps_identify() explicitly issues an EC report using
alps_rpt_cmd(), we no longer need to look at the magic numbers returned
by alps_enter_command_mode().
Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 81bb5d31
...@@ -994,8 +994,7 @@ static int alps_rpt_cmd(struct psmouse *psmouse, int init_command, ...@@ -994,8 +994,7 @@ static int alps_rpt_cmd(struct psmouse *psmouse, int init_command,
return 0; return 0;
} }
static int alps_enter_command_mode(struct psmouse *psmouse, static int alps_enter_command_mode(struct psmouse *psmouse)
unsigned char *resp)
{ {
unsigned char param[4]; unsigned char param[4];
...@@ -1009,9 +1008,6 @@ static int alps_enter_command_mode(struct psmouse *psmouse, ...@@ -1009,9 +1008,6 @@ static int alps_enter_command_mode(struct psmouse *psmouse,
"unknown response while entering command mode\n"); "unknown response while entering command mode\n");
return -1; return -1;
} }
if (resp)
*resp = param[2];
return 0; return 0;
} }
...@@ -1176,7 +1172,7 @@ static int alps_passthrough_mode_v3(struct psmouse *psmouse, ...@@ -1176,7 +1172,7 @@ static int alps_passthrough_mode_v3(struct psmouse *psmouse,
{ {
int reg_val, ret = -1; int reg_val, ret = -1;
if (alps_enter_command_mode(psmouse, NULL)) if (alps_enter_command_mode(psmouse))
return -1; return -1;
reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x0008); reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x0008);
...@@ -1216,7 +1212,7 @@ static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base) ...@@ -1216,7 +1212,7 @@ static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
{ {
int ret = -EIO, reg_val; int ret = -EIO, reg_val;
if (alps_enter_command_mode(psmouse, NULL)) if (alps_enter_command_mode(psmouse))
goto error; goto error;
reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x08); reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x08);
...@@ -1279,7 +1275,7 @@ static int alps_setup_trackstick_v3(struct psmouse *psmouse, int reg_base) ...@@ -1279,7 +1275,7 @@ static int alps_setup_trackstick_v3(struct psmouse *psmouse, int reg_base)
* supported by this driver. If bit 1 isn't set the packet * supported by this driver. If bit 1 isn't set the packet
* format is different. * format is different.
*/ */
if (alps_enter_command_mode(psmouse, NULL) || if (alps_enter_command_mode(psmouse) ||
alps_command_mode_write_reg(psmouse, alps_command_mode_write_reg(psmouse,
reg_base + 0x08, 0x82) || reg_base + 0x08, 0x82) ||
alps_exit_command_mode(psmouse)) alps_exit_command_mode(psmouse))
...@@ -1306,7 +1302,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse) ...@@ -1306,7 +1302,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
alps_setup_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE) == -EIO) alps_setup_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE) == -EIO)
goto error; goto error;
if (alps_enter_command_mode(psmouse, NULL) || if (alps_enter_command_mode(psmouse) ||
alps_absolute_mode_v3(psmouse)) { alps_absolute_mode_v3(psmouse)) {
psmouse_err(psmouse, "Failed to enter absolute mode\n"); psmouse_err(psmouse, "Failed to enter absolute mode\n");
goto error; goto error;
...@@ -1381,7 +1377,7 @@ static int alps_hw_init_rushmore_v3(struct psmouse *psmouse) ...@@ -1381,7 +1377,7 @@ static int alps_hw_init_rushmore_v3(struct psmouse *psmouse)
priv->flags &= ~ALPS_DUALPOINT; priv->flags &= ~ALPS_DUALPOINT;
} }
if (alps_enter_command_mode(psmouse, NULL) || if (alps_enter_command_mode(psmouse) ||
alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 ||
alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00))
goto error; goto error;
...@@ -1431,7 +1427,7 @@ static int alps_hw_init_v4(struct psmouse *psmouse) ...@@ -1431,7 +1427,7 @@ static int alps_hw_init_v4(struct psmouse *psmouse)
struct ps2dev *ps2dev = &psmouse->ps2dev; struct ps2dev *ps2dev = &psmouse->ps2dev;
unsigned char param[4]; unsigned char param[4];
if (alps_enter_command_mode(psmouse, NULL)) if (alps_enter_command_mode(psmouse))
goto error; goto error;
if (alps_absolute_mode_v4(psmouse)) { if (alps_absolute_mode_v4(psmouse)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment