]> git.baikalelectronics.ru Git - kernel.git/commit
tty: baudrate: Explicit usage of B0 for encoding input baudrate
authorPali Rohár <pali@kernel.org>
Mon, 27 Sep 2021 13:35:16 +0000 (15:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 13:00:56 +0000 (15:00 +0200)
commitcb4e48910088d71821f4b51b45af466f5f2272ae
treefa48143abc4202743b158778559c98b9df37ae5a
parent7540ad3c6d15a8b27f71a4ddbf1ad9c4a2379af4
tty: baudrate: Explicit usage of B0 for encoding input baudrate

Function tty_termios_input_baud_rate() checks IBSHIFT & CBAUD against B0
constant to determinate if input speed equals to output speed. So do same
B0 check also in tty_termios_encode_baud_rate() function to make these two
functions compatible.

Currently macro B0 is defined to 0 so there is no functional change.

This change just make code more explicit to show that Bnnn constants are
stored in CBAUD.

Signed-off-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20210927133516.8671-1-pali@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_baudrate.c