Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151322
b: refs/heads/master
c: c5be1b5
h: refs/heads/master
v: v3
  • Loading branch information
Pascal Terjan authored and Greg Kroah-Hartman committed Jun 16, 2009
1 parent 25c75c9 commit de37553
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc71329b3b89b4a5be849b617f2c4f151f0b9213
refs/heads/master: c5be1b52d9ea6ede4931691bf9f0bd454515aa52
15 changes: 15 additions & 0 deletions trunk/drivers/usb/serial/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include <linux/usb/serial.h>

/* Function prototypes */
static int option_probe(struct usb_serial *serial,
const struct usb_device_id *id);
static int option_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp);
static void option_close(struct usb_serial_port *port);
Expand Down Expand Up @@ -555,6 +557,7 @@ static struct usb_serial_driver option_1port_device = {
.usb_driver = &option_driver,
.id_table = option_ids,
.num_ports = 1,
.probe = option_probe,
.open = option_open,
.close = option_close,
.dtr_rts = option_dtr_rts,
Expand Down Expand Up @@ -631,6 +634,18 @@ static void __exit option_exit(void)
module_init(option_init);
module_exit(option_exit);

static int option_probe(struct usb_serial *serial,
const struct usb_device_id *id)
{
/* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */
if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID &&
serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 &&
serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8)
return -ENODEV;

return 0;
}

static void option_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios)
{
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/usb/storage/option_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ int option_ms_init(struct us_data *us)
*/
if (udev->descriptor.bDeviceClass != 0 ||
udev->descriptor.bDeviceSubClass != 0 ||
udev->descriptor.bDeviceProtocol != 0)
udev->descriptor.bDeviceProtocol != 0 ||
udev->actconfig->desc.bNumInterfaces == 3)
return USB_STOR_TRANSPORT_GOOD;

US_DEBUGP("Option MS: option_ms_init called\n");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/storage/unusual_devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100,
UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000,
"D-Link",
"USB Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, option_ms_init, 0),
US_SC_DEVICE, US_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE),

/* Reported by Kevin Lloyd <linux@sierrawireless.com>
* Entry is needed for the initializer function override,
Expand Down

0 comments on commit de37553

Please sign in to comment.