ChangeSet 1.1262, 2003/06/18 17:07:21-07:00, greg@kroah.com [PATCH] USB: fixup aiptek driver for older compilers drivers/usb/aiptek.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff -Nru a/drivers/usb/aiptek.c b/drivers/usb/aiptek.c --- a/drivers/usb/aiptek.c Wed Jun 18 17:34:43 2003 +++ b/drivers/usb/aiptek.c Wed Jun 18 17:34:43 2003 @@ -427,12 +427,14 @@ { unsigned char b = c; int negate = 0; + int ret; + if (b & 0x80) { b = ~b; b--; negate = 1; } - int ret = b; + ret = b; ret = (negate == 1) ? -ret : ret; return ret; } @@ -487,17 +489,19 @@ aiptek->diagnostic = AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE; } else { + int x, y, left, right, middle; + if (aiptek->tool_mode != AIPTEK_TOOL_BUTTON_MOUSE_MODE) { aiptek->tool_mode = AIPTEK_TOOL_BUTTON_MOUSE_MODE; input_report_key(dev, BTN_TOOL_MOUSE, 1); } - int x = aiptek_convert_from_2s_complement(data[2]); - int y = aiptek_convert_from_2s_complement(data[3]); + x = aiptek_convert_from_2s_complement(data[2]); + y = aiptek_convert_from_2s_complement(data[3]); - int left = data[5] & 0x01; - int right = data[5] & 0x02; - int middle = data[5] & 0x04; + left = data[5] & 0x01; + right = data[5] & 0x02; + middle = data[5] & 0x04; jitterable = left | right | middle;