mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
tty: make tty const in tty_get_baud_rate()
After commit 87888fb9ac
("tty: Remove baudrate dead code & make
ktermios params const"), the 'tty' parameter is only read in
tty_get_baud_rate(). Therefore, we can make 'tty' accepted in the
function 'const' for clarity.
The "the terminal bit flags may be updated." part of the
tty_get_baud_rate()'s kernel-doc is dropped as it is no longer true.
Because of the same commit above. And it was misplaced anyway.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231127123713.14504-1-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab58841ab9
commit
a3db64c575
1 changed files with 2 additions and 3 deletions
|
@ -440,10 +440,9 @@ void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud,
|
|||
*
|
||||
* Returns: the baud rate as an integer for this terminal
|
||||
*
|
||||
* Locking: The termios lock must be held by the caller and the terminal bit
|
||||
* flags may be updated.
|
||||
* Locking: The termios lock must be held by the caller.
|
||||
*/
|
||||
static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
|
||||
static inline speed_t tty_get_baud_rate(const struct tty_struct *tty)
|
||||
{
|
||||
return tty_termios_baud_rate(&tty->termios);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue