Ignore:
Timestamp:
Apr 16, 2017, 3:07:01 PM (6 weeks ago)
Author:
brainslayer
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.18/drivers/usb/misc/iowarrior.c

    r29492 r31869  
    788788        dev->product_id = le16_to_cpu(udev->descriptor.idProduct);
    789789
    790         if (iface_desc->desc.bNumEndpoints < 1) {
    791                 dev_err(&interface->dev, "Invalid number of endpoints\n");
    792                 retval = -EINVAL;
    793                 goto error;
    794         }
    795 
    796790        /* set up the endpoint information */
    797791        for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
     
    804798                        dev->int_out_endpoint = endpoint;
    805799        }
     800
     801        if (!dev->int_in_endpoint) {
     802                dev_err(&interface->dev, "no interrupt-in endpoint found\n");
     803                retval = -ENODEV;
     804                goto error;
     805        }
     806
     807        if (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56) {
     808                if (!dev->int_out_endpoint) {
     809                        dev_err(&interface->dev, "no interrupt-out endpoint found\n");
     810                        retval = -ENODEV;
     811                        goto error;
     812                }
     813        }
     814
    806815        /* we have to check the report_size often, so remember it in the endianness suitable for our machine */
    807816        dev->report_size = usb_endpoint_maxp(dev->int_in_endpoint);
Note: See TracChangeset for help on using the changeset viewer.