Skip to contentSkip to conversation

USB: serial: option: use mass-storage class define

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 2/2 USB: serial: option: use mass-storage class define

Use the USB class define rather than a magic number when refusing to bind to mass-storage interfaces.

---
 drivers/usb/serial/option.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/option.c +1 -1
index 96b6a5c6913d..ede0145b8ec9 100644
@@ -2117,7 +2117,7 @@ static int option_probe(struct usb_serial *serial,
 	const struct option_blacklist_info *blacklist;
 
 	/* Never bind to the CD-Rom emulation interface	*/
-	if (iface_desc->bInterfaceClass == 0x08)
+	if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE)
 		return -ENODEV;
 
 	/*