@@ -58,6 +58,7 @@
#define FUTUREMAX_DANCE_MAT BIT(13)
#define NSG_MR5U_REMOTE_BT BIT(14)
#define NSG_MR7U_REMOTE_BT BIT(15)
+#define SHANWAN_GAMEPAD BIT(16)
#define SIXAXIS_CONTROLLER (SIXAXIS_CONTROLLER_USB | SIXAXIS_CONTROLLER_BT)
#define MOTION_CONTROLLER (MOTION_CONTROLLER_USB | MOTION_CONTROLLER_BT)
@@ -1490,6 +1491,7 @@ static int sony_register_sensors(struct sony_sc *sc)
*/
static int sixaxis_set_operational_usb(struct hid_device *hdev)
{
+ struct sony_sc *sc = hid_get_drvdata(hdev);
const int buf_size =
max(SIXAXIS_REPORT_0xF2_SIZE, SIXAXIS_REPORT_0xF5_SIZE);
u8 *buf;
@@ -1521,7 +1523,7 @@ static int sixaxis_set_operational_usb(struct
hid_device *hdev)
* But the USB interrupt would cause SHANWAN controllers to
* start rumbling non-stop.
*/
- if (strcmp(hdev->name, "SHANWAN PS3 GamePad")) {
+ if (sc->quirks & SHANWAN_GAMEPAD) {
ret = hid_hw_output_report(hdev, buf, 1);
if (ret < 0) {