diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-02-16 22:21:19 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-02-16 22:21:19 +0200 |
| commit | 9cd09c9dadbdd01f159e34142841954a7e41a09b (patch) | |
| tree | 413843fd7ad3c7e50de430041111c1c042a8efc6 /usb-tminit.c | |
| parent | d2ce2cc11c119ced4e392880c1f37725b44d8d87 (diff) | |
| download | hid-tminit-9cd09c9dadbdd01f159e34142841954a7e41a09b.tar.gz hid-tminit-9cd09c9dadbdd01f159e34142841954a7e41a09b.zip | |
move setup interrupts to after product check
Diffstat (limited to 'usb-tminit.c')
| -rw-r--r-- | usb-tminit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usb-tminit.c b/usb-tminit.c index 9f5f2be..9fc3f56 100644 --- a/usb-tminit.c +++ b/usb-tminit.c @@ -361,11 +361,9 @@ static int thrustmaster_probe(struct usb_interface *interface, const struct usb_ tm_wheel->interface = usb_get_intf(interface); usb_set_intfdata(interface, tm_wheel); - thrustmaster_interrupts(udev, interface); - - switch (udev->descriptor.idProduct) { + switch (le16_to_cpu(udev->descriptor.idProduct)) { case 0xb69c: - /* T128 resets on model query for whatever reason, try to + /* T128 resets itself for whatever reason, try to * circumvent it. Ugly magic constant, should probably add a * define or something */ ret = thrustmaster_submit_change(tm_wheel, 0x000b); @@ -375,6 +373,8 @@ static int thrustmaster_probe(struct usb_interface *interface, const struct usb_ return ret; } + thrustmaster_interrupts(udev, interface); + usb_fill_control_urb( tm_wheel->urb, tm_wheel->usb_dev, |
