From 9b284d8e648b9a6a297409d2adb34bcebf695818 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 7 Mar 2018 11:49:56 +0100 Subject: [PATCH] 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 Signed-off-by: Johan Hovold --- drivers/usb/serial/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 1f5145d..c3f2522 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1978,7 +1978,7 @@ static int option_probe(struct usb_serial *serial, unsigned long device_flags = id->driver_info; /* Never bind to the CD-Rom emulation interface */ - if (iface_desc->bInterfaceClass == 0x08) + if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE) return -ENODEV; /* -- 2.7.4