Skip to content

Commit

Permalink
Input: ALPS - remove unused argument to alps_enter_command_mode()
Browse files Browse the repository at this point in the history
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: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Kevin Cernekee authored and Dmitry Torokhov committed Feb 22, 2013
1 parent 81bb5d3 commit d18e53f
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,7 @@ static int alps_rpt_cmd(struct psmouse *psmouse, int init_command,
return 0;
}

static int alps_enter_command_mode(struct psmouse *psmouse,
unsigned char *resp)
static int alps_enter_command_mode(struct psmouse *psmouse)
{
unsigned char param[4];

Expand All @@ -1009,9 +1008,6 @@ static int alps_enter_command_mode(struct psmouse *psmouse,
"unknown response while entering command mode\n");
return -1;
}

if (resp)
*resp = param[2];
return 0;
}

Expand Down Expand Up @@ -1176,7 +1172,7 @@ static int alps_passthrough_mode_v3(struct psmouse *psmouse,
{
int reg_val, ret = -1;

if (alps_enter_command_mode(psmouse, NULL))
if (alps_enter_command_mode(psmouse))
return -1;

reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x0008);
Expand Down Expand Up @@ -1216,7 +1212,7 @@ static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
{
int ret = -EIO, reg_val;

if (alps_enter_command_mode(psmouse, NULL))
if (alps_enter_command_mode(psmouse))
goto error;

reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x08);
Expand Down Expand Up @@ -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
* format is different.
*/
if (alps_enter_command_mode(psmouse, NULL) ||
if (alps_enter_command_mode(psmouse) ||
alps_command_mode_write_reg(psmouse,
reg_base + 0x08, 0x82) ||
alps_exit_command_mode(psmouse))
Expand All @@ -1306,7 +1302,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
alps_setup_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE) == -EIO)
goto error;

if (alps_enter_command_mode(psmouse, NULL) ||
if (alps_enter_command_mode(psmouse) ||
alps_absolute_mode_v3(psmouse)) {
psmouse_err(psmouse, "Failed to enter absolute mode\n");
goto error;
Expand Down Expand Up @@ -1381,7 +1377,7 @@ static int alps_hw_init_rushmore_v3(struct psmouse *psmouse)
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_write_reg(psmouse, 0xc2cb, 0x00))
goto error;
Expand Down Expand Up @@ -1431,7 +1427,7 @@ static int alps_hw_init_v4(struct psmouse *psmouse)
struct ps2dev *ps2dev = &psmouse->ps2dev;
unsigned char param[4];

if (alps_enter_command_mode(psmouse, NULL))
if (alps_enter_command_mode(psmouse))
goto error;

if (alps_absolute_mode_v4(psmouse)) {
Expand Down

0 comments on commit d18e53f

Please sign in to comment.