diff options
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r-- | drivers/usb/serial/option.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 648c481605b1..f11672a25ead 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -43,6 +43,8 @@ | |||
43 | #include <linux/usb/serial.h> | 43 | #include <linux/usb/serial.h> |
44 | 44 | ||
45 | /* Function prototypes */ | 45 | /* Function prototypes */ |
46 | static int option_probe(struct usb_serial *serial, | ||
47 | const struct usb_device_id *id); | ||
46 | static int option_open(struct tty_struct *tty, struct usb_serial_port *port, | 48 | static int option_open(struct tty_struct *tty, struct usb_serial_port *port, |
47 | struct file *filp); | 49 | struct file *filp); |
48 | static void option_close(struct usb_serial_port *port); | 50 | static void option_close(struct usb_serial_port *port); |
@@ -555,6 +557,7 @@ static struct usb_serial_driver option_1port_device = { | |||
555 | .usb_driver = &option_driver, | 557 | .usb_driver = &option_driver, |
556 | .id_table = option_ids, | 558 | .id_table = option_ids, |
557 | .num_ports = 1, | 559 | .num_ports = 1, |
560 | .probe = option_probe, | ||
558 | .open = option_open, | 561 | .open = option_open, |
559 | .close = option_close, | 562 | .close = option_close, |
560 | .dtr_rts = option_dtr_rts, | 563 | .dtr_rts = option_dtr_rts, |
@@ -631,6 +634,18 @@ static void __exit option_exit(void) | |||
631 | module_init(option_init); | 634 | module_init(option_init); |
632 | module_exit(option_exit); | 635 | module_exit(option_exit); |
633 | 636 | ||
637 | static int option_probe(struct usb_serial *serial, | ||
638 | const struct usb_device_id *id) | ||
639 | { | ||
640 | /* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */ | ||
641 | if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID && | ||
642 | serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 && | ||
643 | serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8) | ||
644 | return -ENODEV; | ||
645 | |||
646 | return 0; | ||
647 | } | ||
648 | |||
634 | static void option_set_termios(struct tty_struct *tty, | 649 | static void option_set_termios(struct tty_struct *tty, |
635 | struct usb_serial_port *port, struct ktermios *old_termios) | 650 | struct usb_serial_port *port, struct ktermios *old_termios) |
636 | { | 651 | { |