USB: serial: cp210x: refactor flow-control handling
authorJohan Hovold <johan@kernel.org>
Mon, 16 Nov 2020 16:18:25 +0000 (17:18 +0100)
committerJohan Hovold <johan@kernel.org>
Fri, 4 Dec 2020 13:57:27 +0000 (14:57 +0100)
commited921771ffb65ce1f65d746fe8f88c0e0a829d76
tree5dd99aeaa7fe6ca6a4e9f8aa98c1344de5bc0cf9
parentb339628ec08c51c3445f4b094e0011406fc36344
USB: serial: cp210x: refactor flow-control handling

Add a helper function to be used to configure flow control.

The flow-control code was the last caller that relied on the
memset-on-failure behaviour of cp210x_read_reg_block(), which we can now
drop in favour of bailing out on errors when retrieving the flow-control
settings.

This should also simplify adding support for software flow control.

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c