USB: serial: console: add support for enabling flow control
Subsystems (2)
Johan Hovold
maintainerPATCH 1/1 USB: serial: console: add support for enabling 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.
---
Missed this one at first... The white space change is done on purpose to remove a stray tab.
Johan
drivers/usb/serial/console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/usb/serial/console.c +4 -1
@@ -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
Signature · 1 line
2.26.2
Quoted 43 lines · Johan Hovold
Add support for enabling hardware flow control using the 'r' command line option.
This also avoids a W=1 (-Wunused-but-set-variable) warning.
Signed-off-by Johan Hovold <[email protected]>---
Missed this one at first... The white space change is done on purpose to remove a stray tab.
Johan
drivers/usb/serial/console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/usb/serial/console.c +4
-1@@ -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 Signature · 1 line
2.26.2
Nice fix!
And I think one of the first real "bugfixes" that have come out of the recent W=1 work...
Johan Hovold
maintainerQuoted 20 lines · Greg Kroah-Hartman
Quoted 19 lines · Johan Hovold
Add support for enabling hardware flow control using the 'r' command line option.
This also avoids a W=1 (-Wunused-but-set-variable) warning.
Signed-off-by Johan Hovold <[email protected]>drivers/usb/serial/console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/usb/serial/console.c +0
-0@@ -102,6 +102,9 @@ static int usb_console_setup(struct console *co, char *options)break ; }
Quoted 11 lines
Quoted 9 lines
drivers/usb/serial/console.c +3
-0+if (doflow) + cflag |=CRTSCTS ; +/* * no need to check the index here: if the index is wrong, console * code won't call us Signature · 1 line
2.26.2Nice fix!
Or is it a new feature? ;)
Quoted 2 lines
And I think one of the first real "bugfixes" that have come out of the recent W=1 work...
Yeah, first one I've seen too.
Quoted 1 line
Reviewed-by Greg Kroah-Hartman <[email protected]>
Thanks for reviewing. All of these now applied.
Johan