diff options
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/appletouch.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 0117817bf538..f132702d137d 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -504,25 +504,22 @@ static void atp_complete(struct urb* urb) | |||
504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); | 504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); |
505 | } | 505 | } |
506 | 506 | ||
507 | /* Geyser 3 will continue to send packets continually after | 507 | input_report_key(dev->input, BTN_LEFT, key); |
508 | input_sync(dev->input); | ||
509 | |||
510 | /* Many Geysers will continue to send packets continually after | ||
508 | the first touch unless reinitialised. Do so if it's been | 511 | the first touch unless reinitialised. Do so if it's been |
509 | idle for a while in order to avoid waking the kernel up | 512 | idle for a while in order to avoid waking the kernel up |
510 | several hundred times a second */ | 513 | several hundred times a second */ |
511 | 514 | ||
512 | if (atp_is_geyser_3(dev)) { | 515 | if (!x && !y && !key) { |
513 | if (!x && !y && !key) { | 516 | dev->idlecount++; |
514 | dev->idlecount++; | 517 | if (dev->idlecount == 10) { |
515 | if (dev->idlecount == 10) { | 518 | dev->valid = 0; |
516 | dev->valid = 0; | 519 | schedule_work(&dev->work); |
517 | schedule_work(&dev->work); | ||
518 | } | ||
519 | } | 520 | } |
520 | else | 521 | } else |
521 | dev->idlecount = 0; | 522 | dev->idlecount = 0; |
522 | } | ||
523 | |||
524 | input_report_key(dev->input, BTN_LEFT, key); | ||
525 | input_sync(dev->input); | ||
526 | 523 | ||
527 | exit: | 524 | exit: |
528 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); | 525 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); |