summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2018-03-07 11:49:56 +0100
committerJohan Hovold <johan@kernel.org>2018-03-19 12:20:18 +0100
commit9b284d8e648b9a6a297409d2adb34bcebf695818 (patch)
tree997c0ceca80f037a22cc6b8c773eb1ad83dfae99 /drivers/usb
parentUSB: serial: option: drop redundant interface-class test (diff)
downloadlinux-9b284d8e648b9a6a297409d2adb34bcebf695818.tar.xz
linux-9b284d8e648b9a6a297409d2adb34bcebf695818.zip
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/option.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 1f5145d714d6..c3f252283ab9 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;
/*