Merge branch 'for-4.15/sony' into for-linus
authorJiri Kosina <jkosina@suse.cz>
Wed, 15 Nov 2017 10:09:44 +0000 (11:09 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 15 Nov 2017 10:10:21 +0000 (11:10 +0100)
- SHANWAN PS3 rumble fix from Bastien Nocera

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c

index d03203a82e8f78962697791590ef45b35c003833..b9dc3ac4d4aad8301bf55c2ef5ba803b0b742261 100644 (file)
@@ -1439,10 +1439,16 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
                goto out;
        }
 
-       ret = hid_hw_output_report(hdev, buf, 1);
-       if (ret < 0) {
-               hid_info(hdev, "can't set operational mode: step 3, ignoring\n");
-               ret = 0;
+       /*
+        * But the USB interrupt would cause SHANWAN controllers to
+        * start rumbling non-stop.
+        */
+       if (strcmp(hdev->name, "SHANWAN PS3 GamePad")) {
+               ret = hid_hw_output_report(hdev, buf, 1);
+               if (ret < 0) {
+                       hid_info(hdev, "can't set operational mode: step 3, ignoring\n");
+                       ret = 0;
+               }
        }
 
 out: