diff options
author | Johan Hovold <johan@kernel.org> | 2017-03-16 19:13:30 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2017-03-28 11:54:39 +0300 |
commit | 07814246dd5530860ef758fd9b2b5f2e26472aa2 (patch) | |
tree | e27c9ae087d22c49b063e365df2c7f2ba479c253 /drivers/usb/serial/mos7720.c | |
parent | 2ac8fc51ddf152fdd2344c6d286976803183d59c (diff) | |
download | linux-07814246dd5530860ef758fd9b2b5f2e26472aa2.tar.xz |
USB: serial: allow subdrivers to modify port-endpoint mapping
Allow subdrivers to modify the port-endpoint mapping by passing the
endpoint descriptors to calc_num_ports.
The callback can now also be used to verify that the required endpoints
exists and abort probing otherwise.
This will allow us to get rid of a few hacks in subdrivers that are
already modifying the port-endpoint mapping (or aborting probe due to
missing endpoints), but only after the port structures have been setup.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r-- | drivers/usb/serial/mos7720.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index df45ebad5f6f..9ec3e4fb9678 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -973,7 +973,8 @@ static void mos7720_bulk_out_data_callback(struct urb *urb) tty_port_tty_wakeup(&mos7720_port->port->port); } -static int mos77xx_calc_num_ports(struct usb_serial *serial) +static int mos77xx_calc_num_ports(struct usb_serial *serial, + struct usb_serial_endpoints *epds) { u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); if (product == MOSCHIP_DEVICE_ID_7715) |