diff options
| -rw-r--r-- | drivers/input/mouse/appletouch.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index a1804bfdbb8c..0117817bf538 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
| @@ -502,18 +502,23 @@ static void atp_complete(struct urb* urb) | |||
| 502 | 502 | ||
| 503 | /* reset the accumulator on release */ | 503 | /* reset the accumulator on release */ |
| 504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); | 504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); |
| 505 | } | ||
| 506 | |||
| 507 | /* Geyser 3 will continue to send packets continually after | ||
| 508 | the first touch unless reinitialised. Do so if it's been | ||
| 509 | idle for a while in order to avoid waking the kernel up | ||
| 510 | several hundred times a second */ | ||
| 505 | 511 | ||
| 506 | /* Geyser 3 will continue to send packets continually after | 512 | if (atp_is_geyser_3(dev)) { |
| 507 | the first touch unless reinitialised. Do so if it's been | 513 | if (!x && !y && !key) { |
| 508 | idle for a while in order to avoid waking the kernel up | ||
| 509 | several hundred times a second */ | ||
| 510 | if (!key && atp_is_geyser_3(dev)) { | ||
| 511 | dev->idlecount++; | 514 | dev->idlecount++; |
| 512 | if (dev->idlecount == 10) { | 515 | if (dev->idlecount == 10) { |
| 513 | dev->valid = 0; | 516 | dev->valid = 0; |
| 514 | schedule_work(&dev->work); | 517 | schedule_work(&dev->work); |
| 515 | } | 518 | } |
| 516 | } | 519 | } |
| 520 | else | ||
| 521 | dev->idlecount = 0; | ||
| 517 | } | 522 | } |
| 518 | 523 | ||
| 519 | input_report_key(dev->input, BTN_LEFT, key); | 524 | input_report_key(dev->input, BTN_LEFT, key); |
