Commit:     816cbfda8b5113629707f604660204701e93b7ce
Parent:     ea9a4a8b0e5a34eca6613e39d21be879d92ecff5
Author:     Diogo Kastrup <[EMAIL PROTECTED]>
AuthorDate: Tue Jun 19 14:16:15 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 14:13:35 2007 +0200

    HID: fix autocentering of PID devices
    When setting the autocentering of PID devices, PID_DIRECTION_ENABLE is not
    being explicitely set to 1. This results in autocentering working only on 
    vertical axis when this field is preset to 0.
    Fix that by setting it explicitely to 1 when preparing the set_effect report
    for autocentering spring effect.
    Signed-off-by: Diogo Kastrup <[EMAIL PROTECTED]>
    Signed-off-by: Anssi Hannula <[EMAIL PROTECTED]>
    Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
 drivers/hid/usbhid/hid-pidff.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index f5a90e9..0113261 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -738,6 +738,7 @@ static void pidff_autocenter(struct pidff_device *pidff, 
u16 magnitude)
        pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = 0;
        pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0;
        pidff_set(&pidff->set_effect[PID_GAIN], magnitude);
+       pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1;
        pidff->set_effect[PID_START_DELAY].value[0] = 0;
        usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT],
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

Reply via email to