USB: serial: ir-usb: make set_termios synchronous
authorJohan Hovold <johan@kernel.org>
Wed, 22 Jan 2020 10:15:29 +0000 (11:15 +0100)
committerJohan Hovold <johan@kernel.org>
Thu, 23 Jan 2020 08:11:30 +0000 (09:11 +0100)
commite7542bc382f8ca2eae25adaa444044513e474925
tree9d6362917e75469ca78632d7a196c162b7a647b4
parent38c0d5bdf4973f9f5a888166e9d3e9ed0d32057a
USB: serial: ir-usb: make set_termios synchronous

Use a synchronous usb_bulk_msg() when switching link speed in
set_termios(). This way we do not need to keep track of outstanding URBs
in order to be able to stop them at close.

Note that there's no need to set URB_ZERO_PACKET as the one-byte
transfer will always be short.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ir-usb.c