Commit a8c11c15 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman
Browse files

tty: Make ->set_termios() old ktermios const



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

Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220816115739.10928-9-ilpo.jarvinen@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6d47fe5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2274,7 +2274,8 @@ static int mgslpc_ioctl(struct tty_struct *tty,
 *	tty		pointer to tty structure
 *	termios		pointer to buffer to hold returned old termios
 */
static void mgslpc_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
static void mgslpc_set_termios(struct tty_struct *tty,
			       const struct ktermios *old_termios)
{
	MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
	unsigned long flags;
+1 −1
Original line number Diff line number Diff line
@@ -497,7 +497,7 @@ static unsigned int ipoctal_chars_in_buffer(struct tty_struct *tty)
}

static void ipoctal_set_termios(struct tty_struct *tty,
				struct ktermios *old_termios)
				const struct ktermios *old_termios)
{
	unsigned int cflag;
	unsigned char mr1 = 0;
+2 −2
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static inline void sdio_uart_update_mctrl(struct sdio_uart_port *port,

static void sdio_uart_change_speed(struct sdio_uart_port *port,
				   struct ktermios *termios,
				   struct ktermios *old)
				   const struct ktermios *old)
{
	unsigned char cval, fcr = 0;
	unsigned int baud, quot;
@@ -859,7 +859,7 @@ static void sdio_uart_unthrottle(struct tty_struct *tty)
}

static void sdio_uart_set_termios(struct tty_struct *tty,
						struct ktermios *old_termios)
				  const struct ktermios *old_termios)
{
	struct sdio_uart_port *port = tty->driver_data;
	unsigned int cflag = tty->termios.c_cflag;
+2 −1
Original line number Diff line number Diff line
@@ -1380,7 +1380,8 @@ static void hso_serial_cleanup(struct tty_struct *tty)
}

/* setup the term */
static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
static void hso_serial_set_termios(struct tty_struct *tty,
				   const struct ktermios *old)
{
	struct hso_serial *serial = tty->driver_data;
	unsigned long flags;
+1 −1
Original line number Diff line number Diff line
@@ -1760,7 +1760,7 @@ tty3270_flush_chars(struct tty_struct *tty)
 * Check for visible/invisible input switches
 */
static void
tty3270_set_termios(struct tty_struct *tty, struct ktermios *old)
tty3270_set_termios(struct tty_struct *tty, const struct ktermios *old)
{
	struct tty3270 *tp;
	int new;
Loading