diff options
Diffstat (limited to 'drivers/usb/serial/usb_debug.c')
-rw-r--r-- | drivers/usb/serial/usb_debug.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index f9fc926b56d8..fc5d9952b03b 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
16 | #include <linux/usb/serial.h> | 16 | #include <linux/usb/serial.h> |
17 | 17 | ||
18 | #define USB_DEBUG_MAX_PACKET_SIZE 8 | ||
19 | |||
18 | static struct usb_device_id id_table [] = { | 20 | static struct usb_device_id id_table [] = { |
19 | { USB_DEVICE(0x0525, 0x127a) }, | 21 | { USB_DEVICE(0x0525, 0x127a) }, |
20 | { }, | 22 | { }, |
@@ -29,6 +31,13 @@ static struct usb_driver debug_driver = { | |||
29 | .no_dynamic_id = 1, | 31 | .no_dynamic_id = 1, |
30 | }; | 32 | }; |
31 | 33 | ||
34 | int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port, | ||
35 | struct file *filp) | ||
36 | { | ||
37 | port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE; | ||
38 | return usb_serial_generic_open(tty, port, filp); | ||
39 | } | ||
40 | |||
32 | static struct usb_serial_driver debug_device = { | 41 | static struct usb_serial_driver debug_device = { |
33 | .driver = { | 42 | .driver = { |
34 | .owner = THIS_MODULE, | 43 | .owner = THIS_MODULE, |
@@ -36,6 +45,7 @@ static struct usb_serial_driver debug_device = { | |||
36 | }, | 45 | }, |
37 | .id_table = id_table, | 46 | .id_table = id_table, |
38 | .num_ports = 1, | 47 | .num_ports = 1, |
48 | .open = usb_debug_open, | ||
39 | }; | 49 | }; |
40 | 50 | ||
41 | static int __init debug_init(void) | 51 | static int __init debug_init(void) |