Commit 7e7d136e authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

serial: remove termios checks from various old char serial drivers

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d471d340
...@@ -4127,10 +4127,6 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios) ...@@ -4127,10 +4127,6 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
printk(KERN_DEBUG "cyc:cy_set_termios ttyC%d\n", info->line); printk(KERN_DEBUG "cyc:cy_set_termios ttyC%d\n", info->line);
#endif #endif
if (tty->termios->c_cflag == old_termios->c_cflag &&
(tty->termios->c_iflag & (IXON | IXANY)) ==
(old_termios->c_iflag & (IXON | IXANY)))
return;
set_line_char(info); set_line_char(info);
if ((old_termios->c_cflag & CRTSCTS) && if ((old_termios->c_cflag & CRTSCTS) &&
......
...@@ -1121,8 +1121,6 @@ static void change_speed(struct esp_struct *info) ...@@ -1121,8 +1121,6 @@ static void change_speed(struct esp_struct *info)
/* /*
* Set up parity check flag * Set up parity check flag
*/ */
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
info->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR; info->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
if (I_INPCK(info->tty)) if (I_INPCK(info->tty))
info->read_status_mask |= UART_LSR_FE | UART_LSR_PE; info->read_status_mask |= UART_LSR_FE | UART_LSR_PE;
...@@ -1920,11 +1918,6 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios) ...@@ -1920,11 +1918,6 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
struct esp_struct *info = (struct esp_struct *)tty->driver_data; struct esp_struct *info = (struct esp_struct *)tty->driver_data;
unsigned long flags; unsigned long flags;
if ( (tty->termios->c_cflag == old_termios->c_cflag)
&& ( RELEVANT_IFLAG(tty->termios->c_iflag)
== RELEVANT_IFLAG(old_termios->c_iflag)))
return;
change_speed(info); change_speed(info);
spin_lock_irqsave(&info->lock, flags); spin_lock_irqsave(&info->lock, flags);
......
...@@ -1753,9 +1753,6 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old) ...@@ -1753,9 +1753,6 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
return; return;
tiosp = tty->termios; tiosp = tty->termios;
if ((tiosp->c_cflag == old->c_cflag) &&
(tiosp->c_iflag == old->c_iflag))
return;
stli_mkasyport(portp, &aport, tiosp); stli_mkasyport(portp, &aport, tiosp);
stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0); stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
......
...@@ -90,8 +90,6 @@ ...@@ -90,8 +90,6 @@
#define UART_MCR_AFE 0x20 #define UART_MCR_AFE 0x20
#define UART_LSR_SPECIAL 0x1E #define UART_LSR_SPECIAL 0x1E
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
IXON|IXOFF))
#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED) #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED)
...@@ -1729,9 +1727,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi ...@@ -1729,9 +1727,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
struct mxser_struct *info = tty->driver_data; struct mxser_struct *info = tty->driver_data;
unsigned long flags; unsigned long flags;
if ((tty->termios->c_cflag != old_termios->c_cflag) ||
(RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) {
mxser_change_speed(info, old_termios); mxser_change_speed(info, old_termios);
if ((old_termios->c_cflag & CRTSCTS) && if ((old_termios->c_cflag & CRTSCTS) &&
...@@ -1739,7 +1734,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi ...@@ -1739,7 +1734,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
tty->hw_stopped = 0; tty->hw_stopped = 0;
mxser_start(tty); mxser_start(tty);
} }
}
/* Handle sw stopped */ /* Handle sw stopped */
if ((old_termios->c_iflag & IXON) && if ((old_termios->c_iflag & IXON) &&
......
...@@ -72,8 +72,6 @@ ...@@ -72,8 +72,6 @@
#define UART_MCR_AFE 0x20 #define UART_MCR_AFE 0x20
#define UART_LSR_SPECIAL 0x1E #define UART_LSR_SPECIAL 0x1E
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
IXON|IXOFF))
#define C168_ASIC_ID 1 #define C168_ASIC_ID 1
#define C104_ASIC_ID 2 #define C104_ASIC_ID 2
...@@ -1990,9 +1988,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi ...@@ -1990,9 +1988,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
struct mxser_port *info = tty->driver_data; struct mxser_port *info = tty->driver_data;
unsigned long flags; unsigned long flags;
if ((tty->termios->c_cflag != old_termios->c_cflag) ||
(RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) {
spin_lock_irqsave(&info->slock, flags); spin_lock_irqsave(&info->slock, flags);
mxser_change_speed(info, old_termios); mxser_change_speed(info, old_termios);
spin_unlock_irqrestore(&info->slock, flags); spin_unlock_irqrestore(&info->slock, flags);
...@@ -2002,7 +1997,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi ...@@ -2002,7 +1997,6 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
tty->hw_stopped = 0; tty->hw_stopped = 0;
mxser_start(tty); mxser_start(tty);
} }
}
/* Handle sw stopped */ /* Handle sw stopped */
if ((old_termios->c_iflag & IXON) && if ((old_termios->c_iflag & IXON) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment