Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0038cae0ffd72b75699010bd112655dc2615e2fd
Commit:     0038cae0ffd72b75699010bd112655dc2615e2fd
Parent:     ce0982edaec2c46dc9ec466e03f1fe94ee0862d8
Author:     Mark Vytlacil <[EMAIL PROTECTED]>
AuthorDate: Mon May 21 00:31:50 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 00:35:16 2007 -0400

    Input: aiptek - fix relative mode parsing
    
    Corrections to relative mode, was looking at wrong byte
    
    Signed-off-by: Mark Vytlacil <[EMAIL PROTECTED]>
    Signed-off-by: Rene van Paassen <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 drivers/input/tablet/aiptek.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 147ed34..c182877 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -470,18 +470,20 @@ static void aiptek_irq(struct urb *urb)
                         * that a non-zero value indicates that one or more
                         * mouse button was pressed.)
                         */
-                       jitterable = data[5] & 0x07;
+                       jitterable = data[1] & 0x07;
 
-                       left = (data[5] & aiptek->curSetting.mouseButtonLeft) 
!= 0 ? 1 : 0;
-                       right = (data[5] & aiptek->curSetting.mouseButtonRight) 
!= 0 ? 1 : 0;
-                       middle = (data[5] & 
aiptek->curSetting.mouseButtonMiddle) != 0 ? 1 : 0;
+                       left = (data[1] & aiptek->curSetting.mouseButtonLeft >> 
2) != 0 ? 1 : 0;
+                       right = (data[1] & aiptek->curSetting.mouseButtonRight 
>> 2) != 0 ? 1 : 0;
+                       middle = (data[1] & 
aiptek->curSetting.mouseButtonMiddle >> 2) != 0 ? 1 : 0;
 
                        input_report_key(inputdev, BTN_LEFT, left);
                        input_report_key(inputdev, BTN_MIDDLE, middle);
                        input_report_key(inputdev, BTN_RIGHT, right);
+
+                       input_report_abs(inputdev, ABS_MISC,
+                                        1 | AIPTEK_REPORT_TOOL_UNKNOWN);
                        input_report_rel(inputdev, REL_X, x);
                        input_report_rel(inputdev, REL_Y, y);
-                       input_report_rel(inputdev, REL_MISC, 1 | 
AIPTEK_REPORT_TOOL_UNKNOWN);
 
                        /* Wheel support is in the form of a single-event
                         * firing.
-
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