]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
USB: qcserial: support generic Qualcomm serial ports
authorBjørn Mork <bjorn@mork.no>
Sun, 15 Jul 2012 14:47:39 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2012 00:17:59 +0000 (17:17 -0700)
No need to verify the interface layout when doing
interface number based matching.  We can safely trust
the device ID table in this case.

This allows the driver to support any USB interface
layout for non-Gobi 1k/2k+ devices.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/qcserial.c

index a9c4dc4eb05f1f0682ee4b719d2b3a14171a5a1d..90395c7aa56aede21205b594c7565723ff1f72da 100644 (file)
@@ -165,6 +165,13 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
 
        }
 
+       /* allow any number of interfaces when doing direct interface match */
+       if (id->match_flags & USB_DEVICE_ID_MATCH_INT_NUMBER) {
+               dev_dbg(dev, "Generic Qualcomm serial interface found\n");
+               altsetting = 0;
+               goto done;
+       }
+
        if (nintf < 3 || nintf > 4) {
                dev_err(dev, "unknown number of interfaces: %d\n", nintf);
                goto done;