Commit 6538808c authored by Johan Hovold's avatar Johan Hovold

USB: serial: relax generic driver bulk-endpoint requirement

Relax the generic driver bulk-endpoint requirement. The driver handles
devices without bulk-out endpoints just fine these days.
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent a794499b
...@@ -52,10 +52,12 @@ static int usb_serial_generic_calc_num_ports(struct usb_serial *serial, ...@@ -52,10 +52,12 @@ static int usb_serial_generic_calc_num_ports(struct usb_serial *serial,
struct usb_serial_endpoints *epds) struct usb_serial_endpoints *epds)
{ {
struct device *dev = &serial->interface->dev; struct device *dev = &serial->interface->dev;
int num_ports = epds->num_bulk_out; int num_ports;
num_ports = max(epds->num_bulk_in, epds->num_bulk_out);
if (num_ports == 0) { if (num_ports == 0) {
dev_err(dev, "Generic device with no bulk out, not allowed.\n"); dev_err(dev, "device has no bulk endpoints\n");
return -ENODEV; return -ENODEV;
} }
......
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