aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/usb_debug.c')
-rw-r--r--drivers/usb/serial/usb_debug.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index 28026b47344a..f2ed6a31be77 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -16,7 +16,6 @@
16#include <linux/usb.h> 16#include <linux/usb.h>
17#include <linux/usb/serial.h> 17#include <linux/usb/serial.h>
18 18
19#define URB_DEBUG_MAX_IN_FLIGHT_URBS 4000
20#define USB_DEBUG_MAX_PACKET_SIZE 8 19#define USB_DEBUG_MAX_PACKET_SIZE 8
21#define USB_DEBUG_BRK_SIZE 8 20#define USB_DEBUG_BRK_SIZE 8
22static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = { 21static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = {
@@ -44,12 +43,6 @@ static struct usb_driver debug_driver = {
44 .no_dynamic_id = 1, 43 .no_dynamic_id = 1,
45}; 44};
46 45
47static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port)
48{
49 port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
50 return usb_serial_generic_open(tty, port);
51}
52
53/* This HW really does not support a serial break, so one will be 46/* This HW really does not support a serial break, so one will be
54 * emulated when ever the break state is set to true. 47 * emulated when ever the break state is set to true.
55 */ 48 */
@@ -69,7 +62,7 @@ static void usb_debug_read_bulk_callback(struct urb *urb)
69 memcmp(urb->transfer_buffer, USB_DEBUG_BRK, 62 memcmp(urb->transfer_buffer, USB_DEBUG_BRK,
70 USB_DEBUG_BRK_SIZE) == 0) { 63 USB_DEBUG_BRK_SIZE) == 0) {
71 usb_serial_handle_break(port); 64 usb_serial_handle_break(port);
72 usb_serial_generic_resubmit_read_urb(port, GFP_ATOMIC); 65 usb_serial_generic_submit_read_urb(port, GFP_ATOMIC);
73 return; 66 return;
74 } 67 }
75 68
@@ -83,8 +76,7 @@ static struct usb_serial_driver debug_device = {
83 }, 76 },
84 .id_table = id_table, 77 .id_table = id_table,
85 .num_ports = 1, 78 .num_ports = 1,
86 .open = usb_debug_open, 79 .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE,
87 .max_in_flight_urbs = URB_DEBUG_MAX_IN_FLIGHT_URBS,
88 .break_ctl = usb_debug_break_ctl, 80 .break_ctl = usb_debug_break_ctl,
89 .read_bulk_callback = usb_debug_read_bulk_callback, 81 .read_bulk_callback = usb_debug_read_bulk_callback,
90}; 82};