diff options
author | Johan Hovold | 2020-07-01 19:37:22 +0200 |
---|---|---|
committer | Johan Hovold | 2020-07-02 10:38:45 +0200 |
commit | cabe0785ff14e944ab1d828bed64e796e8f96594 (patch) | |
tree | 3e86aefb7f8624e9c47663796374e75c90e18635 /drivers/usb/serial | |
parent | b83076a94dfa1d804a15d8639f5dff67b50fc265 (diff) |
USB: serial: console: add support for flow control
Add support for enabling hardware flow control using the 'r' command
line option.
This also avoids a W=1 (-Wunused-but-set-variable) warning.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/console.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 7d289302ff6c..b97aa40ca4d1 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -79,7 +79,7 @@ static int usb_console_setup(struct console *co, char *options) if (*s) doflow = (*s++ == 'r'); } - + /* Sane default */ if (baud == 0) baud = 9600; @@ -102,6 +102,9 @@ static int usb_console_setup(struct console *co, char *options) break; } + if (doflow) + cflag |= CRTSCTS; + /* * no need to check the index here: if the index is wrong, console * code won't call us |