Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282371
b: refs/heads/master
c: b46615f
h: refs/heads/master
i:
  282369: 51012df
  282367: 77eaa2a
v: v3
  • Loading branch information
Seth Forshee authored and Dmitry Torokhov committed Nov 8, 2011
1 parent cad9b7d commit 1d1fb07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: fa629ef5222193214da9a2b3c94369f79353bec9
refs/heads/master: b46615fe9215214ac00e26d35fc54dbe1c510803
10 changes: 5 additions & 5 deletions trunk/drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static void alps_flush_packet(unsigned long data)

serio_pause_rx(psmouse->ps2dev.serio);

if (psmouse->pktcnt == 6) {
if (psmouse->pktcnt == psmouse->pktsize) {

/*
* We did not any more data in reasonable amount of time.
Expand Down Expand Up @@ -359,16 +359,16 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
return PSMOUSE_BAD_DATA;
}

/* Bytes 2 - 6 should have 0 in the highest bit */
if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
/* Bytes 2 - pktsize should have 0 in the highest bit */
if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize &&
(psmouse->packet[psmouse->pktcnt - 1] & 0x80)) {
psmouse_dbg(psmouse, "refusing packet[%i] = %x\n",
psmouse->pktcnt - 1,
psmouse->packet[psmouse->pktcnt - 1]);
return PSMOUSE_BAD_DATA;
}

if (psmouse->pktcnt == 6) {
if (psmouse->pktcnt == psmouse->pktsize) {
alps_process_packet(psmouse);
return PSMOUSE_FULL_PACKET;
}
Expand Down Expand Up @@ -529,7 +529,7 @@ static int alps_tap_mode(struct psmouse *psmouse, int enable)
static int alps_poll(struct psmouse *psmouse)
{
struct alps_data *priv = psmouse->private;
unsigned char buf[6];
unsigned char buf[sizeof(psmouse->packet)];
bool poll_failed;

if (priv->i->flags & ALPS_PASS)
Expand Down

0 comments on commit 1d1fb07

Please sign in to comment.