Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58470
b: refs/heads/master
c: 37767b6
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Jul 10, 2007
1 parent c47f637 commit 2620bab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 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: cd438a58c89221d8642455d0cc8ec96d3b822f6e
refs/heads/master: 37767b66ed61ee37f0d8f40523f74c31bc187d1d
24 changes: 2 additions & 22 deletions trunk/drivers/input/tablet/aiptek.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,26 +376,6 @@ static const char *map_val_to_str(const struct aiptek_map *map, int val)
return "unknown";
}

/***********************************************************************
* Relative reports deliver values in 2's complement format to
* deal with negative offsets.
*/
static int aiptek_convert_from_2s_complement(unsigned char c)
{
int ret;
unsigned char b = c;
int negate = 0;

if ((b & 0x80) != 0) {
b = ~b;
b--;
negate = 1;
}
ret = b;
ret = (negate == 1) ? -ret : ret;
return ret;
}

/***********************************************************************
* aiptek_irq can receive one of six potential reports.
* The documentation for each is in the body of the function.
Expand Down Expand Up @@ -473,8 +453,8 @@ static void aiptek_irq(struct urb *urb)
aiptek->diagnostic =
AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE;
} else {
x = aiptek_convert_from_2s_complement(data[2]);
y = aiptek_convert_from_2s_complement(data[3]);
x = (signed char) data[2];
y = (signed char) data[3];

/* jitterable keeps track of whether any button has been pressed.
* We're also using it to remap the physical mouse button mask
Expand Down

0 comments on commit 2620bab

Please sign in to comment.