Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=937ad5c1e35191d29d305280525394fe87f4ac4f
Commit:     937ad5c1e35191d29d305280525394fe87f4ac4f
Parent:     aefca8ba5f1b95431e33a52736bab128fc4f80d4
Author:     Soeren Sonnenburg <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 13 00:31:15 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Sat Oct 13 00:31:15 2007 -0400

    Input: appletouch - another fix for idle reset logic
    
    Make sure we reset idlecount when we get a good (non-empty) packet.
    
    Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 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 a1804bf..0117817 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -502,18 +502,23 @@ static void atp_complete(struct urb* urb)
 
                /* reset the accumulator on release */
                memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
+       }
+
+       /* Geyser 3 will continue to send packets continually after
+          the first touch unless reinitialised. Do so if it's been
+          idle for a while in order to avoid waking the kernel up
+          several hundred times a second */
 
-               /* Geyser 3 will continue to send packets continually after
-                  the first touch unless reinitialised. Do so if it's been
-                  idle for a while in order to avoid waking the kernel up
-                  several hundred times a second */
-               if (!key && atp_is_geyser_3(dev)) {
+       if (atp_is_geyser_3(dev)) {
+               if (!x && !y && !key) {
                        dev->idlecount++;
                        if (dev->idlecount == 10) {
                                dev->valid = 0;
                                schedule_work(&dev->work);
                        }
                }
+               else
+                       dev->idlecount = 0;
        }
 
        input_report_key(dev->input, BTN_LEFT, key);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to