diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-25 14:18:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-25 14:18:10 -0400 |
commit | 973ed7c49a5c2271a10ce54ac06bba5617fca3a8 (patch) | |
tree | 6b5956a0341978768b534539b7e5dc01eb43419d /drivers | |
parent | a7f3941a2cecf044f3c2975aee9c2bd423018463 (diff) | |
parent | cb560737676260ac15b68d426305ad5e755417ea (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: appletouch - fix idle reset logic
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/mouse/appletouch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 2bea1b2c631c..a1804bfdbb8c 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -328,6 +328,7 @@ static void atp_complete(struct urb* urb) | |||
328 | { | 328 | { |
329 | int x, y, x_z, y_z, x_f, y_f; | 329 | int x, y, x_z, y_z, x_f, y_f; |
330 | int retval, i, j; | 330 | int retval, i, j; |
331 | int key; | ||
331 | struct atp *dev = urb->context; | 332 | struct atp *dev = urb->context; |
332 | 333 | ||
333 | switch (urb->status) { | 334 | switch (urb->status) { |
@@ -468,6 +469,7 @@ static void atp_complete(struct urb* urb) | |||
468 | ATP_XFACT, &x_z, &x_f); | 469 | ATP_XFACT, &x_z, &x_f); |
469 | y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, | 470 | y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS, |
470 | ATP_YFACT, &y_z, &y_f); | 471 | ATP_YFACT, &y_z, &y_f); |
472 | key = dev->data[dev->datalen - 1] & 1; | ||
471 | 473 | ||
472 | if (x && y) { | 474 | if (x && y) { |
473 | if (dev->x_old != -1) { | 475 | if (dev->x_old != -1) { |
@@ -505,7 +507,7 @@ static void atp_complete(struct urb* urb) | |||
505 | the first touch unless reinitialised. Do so if it's been | 507 | the first touch unless reinitialised. Do so if it's been |
506 | idle for a while in order to avoid waking the kernel up | 508 | idle for a while in order to avoid waking the kernel up |
507 | several hundred times a second */ | 509 | several hundred times a second */ |
508 | if (atp_is_geyser_3(dev)) { | 510 | if (!key && atp_is_geyser_3(dev)) { |
509 | dev->idlecount++; | 511 | dev->idlecount++; |
510 | if (dev->idlecount == 10) { | 512 | if (dev->idlecount == 10) { |
511 | dev->valid = 0; | 513 | dev->valid = 0; |
@@ -514,7 +516,7 @@ static void atp_complete(struct urb* urb) | |||
514 | } | 516 | } |
515 | } | 517 | } |
516 | 518 | ||
517 | input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen - 1] & 1); | 519 | input_report_key(dev->input, BTN_LEFT, key); |
518 | input_sync(dev->input); | 520 | input_sync(dev->input); |
519 | 521 | ||
520 | exit: | 522 | exit: |