diff options
author | Johan Hovold <jhovold@gmail.com> | 2011-11-06 13:06:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-15 13:40:30 -0500 |
commit | ac3695fb74f27ae36632bcc2d83c0f2c8c4a7ca2 (patch) | |
tree | 331f351bda9e8429afe4ce5eadfc75093f2b45b4 /drivers | |
parent | e63aa508f20283b49cfdc47018455778690800cd (diff) |
USB: usb_debug: use process_read_urb
Use process_read_urb rather than read_bulk_callback for break
processing.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/usb_debug.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 51bb509219e0..9b632e753210 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c | |||
@@ -54,7 +54,7 @@ static void usb_debug_break_ctl(struct tty_struct *tty, int break_state) | |||
54 | usb_serial_generic_write(tty, port, USB_DEBUG_BRK, USB_DEBUG_BRK_SIZE); | 54 | usb_serial_generic_write(tty, port, USB_DEBUG_BRK, USB_DEBUG_BRK_SIZE); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void usb_debug_read_bulk_callback(struct urb *urb) | 57 | static void usb_debug_process_read_urb(struct urb *urb) |
58 | { | 58 | { |
59 | struct usb_serial_port *port = urb->context; | 59 | struct usb_serial_port *port = urb->context; |
60 | 60 | ||
@@ -62,11 +62,10 @@ static void usb_debug_read_bulk_callback(struct urb *urb) | |||
62 | memcmp(urb->transfer_buffer, USB_DEBUG_BRK, | 62 | memcmp(urb->transfer_buffer, USB_DEBUG_BRK, |
63 | USB_DEBUG_BRK_SIZE) == 0) { | 63 | USB_DEBUG_BRK_SIZE) == 0) { |
64 | usb_serial_handle_break(port); | 64 | usb_serial_handle_break(port); |
65 | usb_serial_generic_submit_read_urb(port, GFP_ATOMIC); | ||
66 | return; | 65 | return; |
67 | } | 66 | } |
68 | 67 | ||
69 | usb_serial_generic_read_bulk_callback(urb); | 68 | usb_serial_generic_process_read_urb(urb); |
70 | } | 69 | } |
71 | 70 | ||
72 | static struct usb_serial_driver debug_device = { | 71 | static struct usb_serial_driver debug_device = { |
@@ -79,7 +78,7 @@ static struct usb_serial_driver debug_device = { | |||
79 | .num_ports = 1, | 78 | .num_ports = 1, |
80 | .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE, | 79 | .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE, |
81 | .break_ctl = usb_debug_break_ctl, | 80 | .break_ctl = usb_debug_break_ctl, |
82 | .read_bulk_callback = usb_debug_read_bulk_callback, | 81 | .process_read_urb = usb_debug_process_read_urb, |
83 | }; | 82 | }; |
84 | 83 | ||
85 | static int __init debug_init(void) | 84 | static int __init debug_init(void) |