summaryrefslogtreecommitdiff
path: root/drivers/tty/tty.h
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-08-16 14:57:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-30 15:22:34 +0300
commit87888fb9ac0c71cdc1edd0779382052475dadb84 (patch)
tree988f9f9b61119e7ed9db887a0996bbe41d734e06 /drivers/tty/tty.h
parenteb9e109d010cb79ab01d8562e851d53bcecf059b (diff)
downloadlinux-87888fb9ac0c71cdc1edd0779382052475dadb84.tar.xz
tty: Remove baudrate dead code & make ktermios params const
With the architectures currently in-tree, either: 1) CBAUDEX is zero 2) The earlier BOTHER if check covers cbaud < 1 case 3) All CBAUD bits are covered by the baud_table Thus, the check for cbaud being out-of-range for CBAUDEX case cannot ever be true. The ktermios parameters can now be made const. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220816115739.10928-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty.h')
-rw-r--r--drivers/tty/tty.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index f310a8274df1..1c08c9b67b16 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -73,7 +73,7 @@ void tty_buffer_set_lock_subclass(struct tty_port *port);
bool tty_buffer_restart_work(struct tty_port *port);
bool tty_buffer_cancel_work(struct tty_port *port);
void tty_buffer_flush_work(struct tty_port *port);
-speed_t tty_termios_input_baud_rate(struct ktermios *termios);
+speed_t tty_termios_input_baud_rate(const struct ktermios *termios);
void tty_ldisc_hangup(struct tty_struct *tty, bool reset);
int tty_ldisc_reinit(struct tty_struct *tty, int disc);
long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg);