tty: Make tty_termios_copy_hw() old ktermios const

There should be no reason to adjust old ktermios which is going to get
discarded anyway.

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-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ilpo Järvinen 2022-08-16 14:57:35 +03:00 committed by Greg Kroah-Hartman
parent c87391b5dd
commit d15f89d997
2 changed files with 2 additions and 2 deletions

View File

@ -249,7 +249,7 @@ static void unset_locked_termios(struct tty_struct *tty, struct ktermios *old)
* in some cases where only minimal reconfiguration is supported * in some cases where only minimal reconfiguration is supported
*/ */
void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old) void tty_termios_copy_hw(struct ktermios *new, const struct ktermios *old)
{ {
/* The bits a dumb device handles in software. Smart devices need /* The bits a dumb device handles in software. Smart devices need
to always provide a set_termios method */ to always provide a set_termios method */

View File

@ -458,7 +458,7 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
unsigned char tty_get_char_size(unsigned int cflag); unsigned char tty_get_char_size(unsigned int cflag);
unsigned char tty_get_frame_size(unsigned int cflag); unsigned char tty_get_frame_size(unsigned int cflag);
void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); void tty_termios_copy_hw(struct ktermios *new, const struct ktermios *old);
int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b); int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b);
int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);