Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282368
b: refs/heads/master
c: 5a6c865
h: refs/heads/master
v: v3
  • Loading branch information
Chris Bagwell authored and Dmitry Torokhov committed Nov 8, 2011
1 parent 77eaa2a commit 7ed586e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2cc817a7697685f034c90542053d85e7012c760
refs/heads/master: 5a6c865d9861efdd066db1b5da491ebc2ff5926d
9 changes: 9 additions & 0 deletions trunk/drivers/input/tablet/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,9 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
unsigned char *data = wacom->data;
int i;

if (data[0] != 0x02)
return 0;

for (i = 0; i < 2; i++) {
int p = data[9 * i + 2];
bool touch = p && !wacom->shared->stylus_in_proximity;
Expand Down Expand Up @@ -875,6 +878,9 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
int count = data[1] & 0x03;
int i;

if (data[0] != 0x02)
return 0;

/* data has up to 7 fixed sized 8-byte messages starting at data[2] */
for (i = 0; i < count; i++) {
int offset = (8 * i) + 2;
Expand All @@ -900,6 +906,9 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
unsigned char *data = wacom->data;
int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;

if (data[0] != 0x02)
return 0;

prox = (data[1] & 0x20) == 0x20;

/*
Expand Down

0 comments on commit 7ed586e

Please sign in to comment.