From: Benjamin Herrenschmidt Date: Mon, 9 Aug 2010 03:48:08 +0000 (+1000) Subject: Revert "Input: appletouch - fix integer overflow issue" X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6e49c1a407c8af8d779a24fd2428857991514a7b;p=linux-beck.git Revert "Input: appletouch - fix integer overflow issue" This reverts commit 04b4b88cca0ebe3813b4b6f014fb6a0db380b137. While the original problem only caused a slight disturbance on the edge of the touchpad, the commit above to "fix" it completely breaks operation on some other models such as mine. We'll sort this out separately, revert the patch for now. Signed-off-by: Benjamin Herrenschmidt --- diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 05edd75abca0..a9cf76831634 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -205,8 +205,8 @@ struct atp { bool overflow_warned; int x_old; /* last reported x/y, */ int y_old; /* used for smoothing */ - u8 xy_cur[ATP_XSENSORS + ATP_YSENSORS]; - u8 xy_old[ATP_XSENSORS + ATP_YSENSORS]; + signed char xy_cur[ATP_XSENSORS + ATP_YSENSORS]; + signed char xy_old[ATP_XSENSORS + ATP_YSENSORS]; int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; int idlecount; /* number of empty packets */ struct work_struct work; @@ -531,7 +531,7 @@ static void atp_complete_geyser_1_2(struct urb *urb) for (i = 0; i < ATP_XSENSORS + ATP_YSENSORS; i++) { /* accumulate the change */ - int change = dev->xy_old[i] - dev->xy_cur[i]; + signed char change = dev->xy_old[i] - dev->xy_cur[i]; dev->xy_acc[i] -= change; /* prevent down drifting */