From 9cd09c9dadbdd01f159e34142841954a7e41a09b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 16 Feb 2024 22:21:19 +0200 Subject: move setup interrupts to after product check --- usb-tminit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usb-tminit.c') 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, -- cgit v1.3