Commit 07c3b1a1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: remove broken usb-serial num_endpoints check

The num_interrupt_in, num_bulk_in, and other checks in the usb-serial
code are just wrong, there are too many different devices out there with
different numbers of endpoints.  We need to just be sticking with the
device ids instead of trying to catch this kind of thing.  It broke too
many different devices.

This fixes a large number of usb-serial devices to get them working
properly again.


Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 32147be4
...@@ -854,6 +854,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -854,6 +854,7 @@ int usb_serial_probe(struct usb_interface *interface,
serial->num_interrupt_in = num_interrupt_in; serial->num_interrupt_in = num_interrupt_in;
serial->num_interrupt_out = num_interrupt_out; serial->num_interrupt_out = num_interrupt_out;
#if 0
/* check that the device meets the driver's requirements */ /* check that the device meets the driver's requirements */
if ((type->num_interrupt_in != NUM_DONT_CARE && if ((type->num_interrupt_in != NUM_DONT_CARE &&
type->num_interrupt_in != num_interrupt_in) type->num_interrupt_in != num_interrupt_in)
...@@ -867,6 +868,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -867,6 +868,7 @@ int usb_serial_probe(struct usb_interface *interface,
kfree(serial); kfree(serial);
return -EIO; return -EIO;
} }
#endif
/* found all that we need */ /* found all that we need */
dev_info(&interface->dev, "%s converter detected\n", dev_info(&interface->dev, "%s converter detected\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment