USB: serial: add generic wait_until_sent implementation
Add generic wait_until_sent implementation which polls for empty hardware buffers using the new port-operation tx_empty. The generic implementation will be used for all sub-drivers that implement tx_empty but does not define wait_until_sent. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
0693196fe7
commit
dcf0105039
@@ -1333,6 +1333,8 @@ static void usb_serial_operations_init(struct usb_serial_driver *device)
|
||||
set_to_generic_if_null(device, close);
|
||||
set_to_generic_if_null(device, write_room);
|
||||
set_to_generic_if_null(device, chars_in_buffer);
|
||||
if (device->tx_empty)
|
||||
set_to_generic_if_null(device, wait_until_sent);
|
||||
set_to_generic_if_null(device, read_bulk_callback);
|
||||
set_to_generic_if_null(device, write_bulk_callback);
|
||||
set_to_generic_if_null(device, process_read_urb);
|
||||
|
Reference in New Issue
Block a user