diff options
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r-- | drivers/usb/serial/option.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index e178e6f40319..8c3f55b080b4 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -113,6 +113,12 @@ static int option_send_setup(struct usb_serial_port *port); | |||
113 | #define ANYDATA_VENDOR_ID 0x16d5 | 113 | #define ANYDATA_VENDOR_ID 0x16d5 |
114 | #define ANYDATA_PRODUCT_ID 0x6501 | 114 | #define ANYDATA_PRODUCT_ID 0x6501 |
115 | 115 | ||
116 | #define BANDRICH_VENDOR_ID 0x1A8D | ||
117 | #define BANDRICH_PRODUCT_C100_1 0x1002 | ||
118 | #define BANDRICH_PRODUCT_C100_2 0x1003 | ||
119 | |||
120 | #define DELL_VENDOR_ID 0x413C | ||
121 | |||
116 | static struct usb_device_id option_ids[] = { | 122 | static struct usb_device_id option_ids[] = { |
117 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 123 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
118 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 124 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -165,6 +171,9 @@ static struct usb_device_id option_ids[] = { | |||
165 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ | 171 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ |
166 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ | 172 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ |
167 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, | 173 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, |
174 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | ||
175 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | ||
176 | { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard */ | ||
168 | { } /* Terminating entry */ | 177 | { } /* Terminating entry */ |
169 | }; | 178 | }; |
170 | MODULE_DEVICE_TABLE(usb, option_ids); | 179 | MODULE_DEVICE_TABLE(usb, option_ids); |
@@ -591,12 +600,6 @@ static int option_open(struct usb_serial_port *port, struct file *filp) | |||
591 | return (0); | 600 | return (0); |
592 | } | 601 | } |
593 | 602 | ||
594 | static inline void stop_urb(struct urb *urb) | ||
595 | { | ||
596 | if (urb && urb->status == -EINPROGRESS) | ||
597 | usb_kill_urb(urb); | ||
598 | } | ||
599 | |||
600 | static void option_close(struct usb_serial_port *port, struct file *filp) | 603 | static void option_close(struct usb_serial_port *port, struct file *filp) |
601 | { | 604 | { |
602 | int i; | 605 | int i; |
@@ -614,9 +617,9 @@ static void option_close(struct usb_serial_port *port, struct file *filp) | |||
614 | 617 | ||
615 | /* Stop reading/writing urbs */ | 618 | /* Stop reading/writing urbs */ |
616 | for (i = 0; i < N_IN_URB; i++) | 619 | for (i = 0; i < N_IN_URB; i++) |
617 | stop_urb(portdata->in_urbs[i]); | 620 | usb_kill_urb(portdata->in_urbs[i]); |
618 | for (i = 0; i < N_OUT_URB; i++) | 621 | for (i = 0; i < N_OUT_URB; i++) |
619 | stop_urb(portdata->out_urbs[i]); | 622 | usb_kill_urb(portdata->out_urbs[i]); |
620 | } | 623 | } |
621 | port->tty = NULL; | 624 | port->tty = NULL; |
622 | } | 625 | } |
@@ -747,9 +750,9 @@ static void option_shutdown(struct usb_serial *serial) | |||
747 | port = serial->port[i]; | 750 | port = serial->port[i]; |
748 | portdata = usb_get_serial_port_data(port); | 751 | portdata = usb_get_serial_port_data(port); |
749 | for (j = 0; j < N_IN_URB; j++) | 752 | for (j = 0; j < N_IN_URB; j++) |
750 | stop_urb(portdata->in_urbs[j]); | 753 | usb_kill_urb(portdata->in_urbs[j]); |
751 | for (j = 0; j < N_OUT_URB; j++) | 754 | for (j = 0; j < N_OUT_URB; j++) |
752 | stop_urb(portdata->out_urbs[j]); | 755 | usb_kill_urb(portdata->out_urbs[j]); |
753 | } | 756 | } |
754 | 757 | ||
755 | /* Now free them */ | 758 | /* Now free them */ |