Skip to contentSkip to conversation

USB: serial: option: drop redundant interface-class test

PATCH New Johan Hovold 1 participant 1 message Mar 7, 2018

Subsystems (2)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

PATCH 1/2 USB: serial: option: drop redundant interface-class test

Drop redundant interface-class test for Samsung GT-B3730 modems for which we only match and probe the CDC data interface.

---
 drivers/usb/serial/option.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/usb/serial/option.c +0 -9
index 2d8d9150da0c..96b6a5c6913d 100644
@@ -2114,7 +2114,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;
 	const struct option_blacklist_info *blacklist;
 
 	/* Never bind to the CD-Rom emulation interface	*/
@@ -2130,14 +2129,6 @@ static int option_probe(struct usb_serial *serial,
 	if (blacklist && test_bit(iface_desc->bInterfaceNumber,
 						&blacklist->reserved))
 		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 blacklist info so we can use it during attach. */
 	usb_set_serial_data(serial, (void *)blacklist);