Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361020
b: refs/heads/master
c: d18e53f
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Cernekee authored and Dmitry Torokhov committed Feb 22, 2013
1 parent d5d8660 commit 92b3142
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81bb5d31fbf3893a8e041c649dea704dd11d5272
refs/heads/master: d18e53fce2f6e42bfb8ac157547dd3f804385749
18 changes: 7 additions & 11 deletions trunk/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 92b3142

Please sign in to comment.