Skip to content

Commit ac3695f

Browse files
jhovoldgregkh
authored andcommitted
USB: usb_debug: use process_read_urb
Use process_read_urb rather than read_bulk_callback for break processing. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e63aa50 commit ac3695f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/usb/serial/usb_debug.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,18 @@ static void usb_debug_break_ctl(struct tty_struct *tty, int break_state)
5454
usb_serial_generic_write(tty, port, USB_DEBUG_BRK, USB_DEBUG_BRK_SIZE);
5555
}
5656

57-
static void usb_debug_read_bulk_callback(struct urb *urb)
57+
static void usb_debug_process_read_urb(struct urb *urb)
5858
{
5959
struct usb_serial_port *port = urb->context;
6060

6161
if (urb->actual_length == USB_DEBUG_BRK_SIZE &&
6262
memcmp(urb->transfer_buffer, USB_DEBUG_BRK,
6363
USB_DEBUG_BRK_SIZE) == 0) {
6464
usb_serial_handle_break(port);
65-
usb_serial_generic_submit_read_urb(port, GFP_ATOMIC);
6665
return;
6766
}
6867

69-
usb_serial_generic_read_bulk_callback(urb);
68+
usb_serial_generic_process_read_urb(urb);
7069
}
7170

7271
static struct usb_serial_driver debug_device = {
@@ -79,7 +78,7 @@ static struct usb_serial_driver debug_device = {
7978
.num_ports = 1,
8079
.bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE,
8180
.break_ctl = usb_debug_break_ctl,
82-
.read_bulk_callback = usb_debug_read_bulk_callback,
81+
.process_read_urb = usb_debug_process_read_urb,
8382
};
8483

8584
static int __init debug_init(void)

0 commit comments

Comments
 (0)