Skip to content

Commit

Permalink
Merge branch 'for-4.15/sony' into for-linus
Browse files Browse the repository at this point in the history
- SHANWAN PS3 rumble fix from Bastien Nocera

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Nov 15, 2017
2 parents ea3bbd0 + 492ca83 commit b50b9d3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/hid/hid-sony.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b50b9d3

Please sign in to comment.