Эх сурвалжийг харах

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.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Johan Hovold 7 жил өмнө
parent
commit
9b284d8e64

+ 1 - 1
drivers/usb/serial/option.c

@@ -1978,7 +1978,7 @@ static int option_probe(struct usb_serial *serial,
 	unsigned long device_flags = id->driver_info;
 	unsigned long device_flags = id->driver_info;
 
 
 	/* Never bind to the CD-Rom emulation interface	*/
 	/* Never bind to the CD-Rom emulation interface	*/
-	if (iface_desc->bInterfaceClass == 0x08)
+	if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE)
 		return -ENODEV;
 		return -ENODEV;
 
 
 	/*
 	/*