tty: n_tty: move newline handling to a separate function
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Sun, 27 Aug 2023 07:41:41 +0000 (09:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2023 09:46:52 +0000 (11:46 +0200)
commit008304079da79ab8dd122fe9e581494d10c0a3cc
treee3469b824e86051424bee81e900117d9c8c42fe0
parent102dc8aac8d04be7ec6ee030962f7a40dc6d9731
tty: n_tty: move newline handling to a separate function

Currently, n_tty handles the newline in a label in
n_tty_receive_char_canon(). That is invoked from two more places. Split
this code to a separate function and avoid the label in this case.

This makes the code flow more understandable.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230827074147.2287-9-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c