]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
USB: serial: option: drop redundant interface-class test
authorJohan Hovold <johan@kernel.org>
Wed, 7 Mar 2018 10:49:55 +0000 (11:49 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 19 Mar 2018 11:20:11 +0000 (12:20 +0100)
Drop redundant interface-class test for Samsung GT-B3730 modems for
which we only match and probe the CDC data interface.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/option.c

index b331baec3a0babf229f33f1b6b11876dd324d48f..1f5145d714d6c605aecec4d60a525f960cad7fad 100644 (file)
@@ -1975,7 +1975,6 @@ static int option_probe(struct usb_serial *serial,
 {
        struct usb_interface_descriptor *iface_desc =
                                &serial->interface->cur_altsetting->desc;
-       struct usb_device_descriptor *dev_desc = &serial->dev->descriptor;
        unsigned long device_flags = id->driver_info;
 
        /* Never bind to the CD-Rom emulation interface */
@@ -1989,14 +1988,6 @@ static int option_probe(struct usb_serial *serial,
         */
        if (device_flags & RSVD(iface_desc->bInterfaceNumber))
                return -ENODEV;
-       /*
-        * Don't bind network interface on Samsung GT-B3730, it is handled by
-        * a separate module.
-        */
-       if (dev_desc->idVendor == cpu_to_le16(SAMSUNG_VENDOR_ID) &&
-           dev_desc->idProduct == cpu_to_le16(SAMSUNG_PRODUCT_GT_B3730) &&
-           iface_desc->bInterfaceClass != USB_CLASS_CDC_DATA)
-               return -ENODEV;
 
        /* Store the device flags so we can use them during attach. */
        usb_set_serial_data(serial, (void *)device_flags);