Merge tag 'ib-mfd-many-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
[linux.git] / drivers / input / joystick / xpad.c
index ca0e19ae7a90f0a2854938f926c5d7ece0675686..d86e59515b9c9eadeab8346e8f97780e3edf1690 100644 (file)
@@ -408,7 +408,7 @@ static const signed short xpad_abs_triggers[] = {
 #define XPAD_XBOXONE_VENDOR(vend) \
        { XPAD_XBOXONE_VENDOR_PROTOCOL(vend, 208) }
 
-static struct usb_device_id xpad_table[] = {
+static const struct usb_device_id xpad_table[] = {
        { USB_INTERFACE_INFO('X', 'B', 0) },    /* X-Box USB-IF not approved class */
        XPAD_XBOX360_VENDOR(0x044f),            /* Thrustmaster X-Box 360 controllers */
        XPAD_XBOX360_VENDOR(0x045e),            /* Microsoft X-Box 360 controllers */
@@ -1764,10 +1764,12 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
                struct usb_endpoint_descriptor *ep =
                                &intf->cur_altsetting->endpoint[i].desc;
 
-               if (usb_endpoint_dir_in(ep))
-                       ep_irq_in = ep;
-               else
-                       ep_irq_out = ep;
+               if (usb_endpoint_xfer_int(ep)) {
+                       if (usb_endpoint_dir_in(ep))
+                               ep_irq_in = ep;
+                       else
+                               ep_irq_out = ep;
+               }
        }
 
        if (!ep_irq_in || !ep_irq_out) {
This page took 0.033893 seconds and 4 git commands to generate.