aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2007-07-16 02:41:49 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:52 -0400
commit7e7d136e9e083f04b859411248c699cbb89e418d (patch)
tree5a33558da1e1b8bb19b9174ed79dd010abda1334 /drivers/char
parentd471d340ef9543a1e2f70f99c21ee2c770e7b17c (diff)
serial: remove termios checks from various old char serial drivers
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/cyclades.c4
-rw-r--r--drivers/char/esp.c7
-rw-r--r--drivers/char/istallion.c3
-rw-r--r--drivers/char/mxser.c16
-rw-r--r--drivers/char/mxser_new.c20
5 files changed, 12 insertions, 38 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index ca376b92162c..e04005b5f8a6 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -4127,10 +4127,6 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
4127 printk(KERN_DEBUG "cyc:cy_set_termios ttyC%d\n", info->line); 4127 printk(KERN_DEBUG "cyc:cy_set_termios ttyC%d\n", info->line);
4128#endif 4128#endif
4129 4129
4130 if (tty->termios->c_cflag == old_termios->c_cflag &&
4131 (tty->termios->c_iflag & (IXON | IXANY)) ==
4132 (old_termios->c_iflag & (IXON | IXANY)))
4133 return;
4134 set_line_char(info); 4130 set_line_char(info);
4135 4131
4136 if ((old_termios->c_cflag & CRTSCTS) && 4132 if ((old_termios->c_cflag & CRTSCTS) &&
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index d1bfbaa2aa02..74cd5118af57 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -1121,8 +1121,6 @@ static void change_speed(struct esp_struct *info)
1121 /* 1121 /*
1122 * Set up parity check flag 1122 * Set up parity check flag
1123 */ 1123 */
1124#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
1125
1126 info->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR; 1124 info->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
1127 if (I_INPCK(info->tty)) 1125 if (I_INPCK(info->tty))
1128 info->read_status_mask |= UART_LSR_FE | UART_LSR_PE; 1126 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 struct esp_struct *info = (struct esp_struct *)tty->driver_data; 1918 struct esp_struct *info = (struct esp_struct *)tty->driver_data;
1921 unsigned long flags; 1919 unsigned long flags;
1922 1920
1923 if ( (tty->termios->c_cflag == old_termios->c_cflag)
1924 && ( RELEVANT_IFLAG(tty->termios->c_iflag)
1925 == RELEVANT_IFLAG(old_termios->c_iflag)))
1926 return;
1927
1928 change_speed(info); 1921 change_speed(info);
1929 1922
1930 spin_lock_irqsave(&info->lock, flags); 1923 spin_lock_irqsave(&info->lock, flags);
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 7b279d1de4a2..809409922996 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -1753,9 +1753,6 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
1753 return; 1753 return;
1754 1754
1755 tiosp = tty->termios; 1755 tiosp = tty->termios;
1756 if ((tiosp->c_cflag == old->c_cflag) &&
1757 (tiosp->c_iflag == old->c_iflag))
1758 return;
1759 1756
1760 stli_mkasyport(portp, &aport, tiosp); 1757 stli_mkasyport(portp, &aport, tiosp);
1761 stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0); 1758 stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 5953a45d7e96..2aee3fef0416 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -90,8 +90,6 @@
90#define UART_MCR_AFE 0x20 90#define UART_MCR_AFE 0x20
91#define UART_LSR_SPECIAL 0x1E 91#define UART_LSR_SPECIAL 0x1E
92 92
93#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
94 IXON|IXOFF))
95 93
96#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED) 94#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED)
97 95
@@ -1729,16 +1727,12 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
1729 struct mxser_struct *info = tty->driver_data; 1727 struct mxser_struct *info = tty->driver_data;
1730 unsigned long flags; 1728 unsigned long flags;
1731 1729
1732 if ((tty->termios->c_cflag != old_termios->c_cflag) || 1730 mxser_change_speed(info, old_termios);
1733 (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) {
1734 1731
1735 mxser_change_speed(info, old_termios); 1732 if ((old_termios->c_cflag & CRTSCTS) &&
1736 1733 !(tty->termios->c_cflag & CRTSCTS)) {
1737 if ((old_termios->c_cflag & CRTSCTS) && 1734 tty->hw_stopped = 0;
1738 !(tty->termios->c_cflag & CRTSCTS)) { 1735 mxser_start(tty);
1739 tty->hw_stopped = 0;
1740 mxser_start(tty);
1741 }
1742 } 1736 }
1743 1737
1744/* Handle sw stopped */ 1738/* Handle sw stopped */
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 71b965705177..6a563932ba19 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -72,8 +72,6 @@
72#define UART_MCR_AFE 0x20 72#define UART_MCR_AFE 0x20
73#define UART_LSR_SPECIAL 0x1E 73#define UART_LSR_SPECIAL 0x1E
74 74
75#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
76 IXON|IXOFF))
77 75
78#define C168_ASIC_ID 1 76#define C168_ASIC_ID 1
79#define C104_ASIC_ID 2 77#define C104_ASIC_ID 2
@@ -1990,18 +1988,14 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
1990 struct mxser_port *info = tty->driver_data; 1988 struct mxser_port *info = tty->driver_data;
1991 unsigned long flags; 1989 unsigned long flags;
1992 1990
1993 if ((tty->termios->c_cflag != old_termios->c_cflag) || 1991 spin_lock_irqsave(&info->slock, flags);
1994 (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { 1992 mxser_change_speed(info, old_termios);
1995 1993 spin_unlock_irqrestore(&info->slock, flags);
1996 spin_lock_irqsave(&info->slock, flags);
1997 mxser_change_speed(info, old_termios);
1998 spin_unlock_irqrestore(&info->slock, flags);
1999 1994
2000 if ((old_termios->c_cflag & CRTSCTS) && 1995 if ((old_termios->c_cflag & CRTSCTS) &&
2001 !(tty->termios->c_cflag & CRTSCTS)) { 1996 !(tty->termios->c_cflag & CRTSCTS)) {
2002 tty->hw_stopped = 0; 1997 tty->hw_stopped = 0;
2003 mxser_start(tty); 1998 mxser_start(tty);
2004 }
2005 } 1999 }
2006 2000
2007 /* Handle sw stopped */ 2001 /* Handle sw stopped */