Skip to content

Commit

Permalink
Revert "Input: appletouch - fix integer overflow issue"
Browse files Browse the repository at this point in the history
This reverts commit 04b4b88.

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 <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Aug 9, 2010
1 parent 8b449d1 commit 6e49c1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/input/mouse/appletouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 6e49c1a

Please sign in to comment.