serial: remove termios checks from various old char serial drivers
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Mon, 16 Jul 2007 06:41:49 +0000 (23:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:52 +0000 (09:05 -0700)
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>
drivers/char/cyclades.c
drivers/char/esp.c
drivers/char/istallion.c
drivers/char/mxser.c
drivers/char/mxser_new.c

index ca376b92162c293fe3508852971305b14538b528..e04005b5f8a64e57de3ebfcaf3e448708257d571 100644 (file)
@@ -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);
 #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);
 
        if ((old_termios->c_cflag & CRTSCTS) &&
index d1bfbaa2aa0284f62a2d400ed8e74d34221106eb..74cd5118af5771160dfd9597d9fa427f8e0ff134 100644 (file)
@@ -1121,8 +1121,6 @@ static void change_speed(struct esp_struct *info)
        /*
         * 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;
        if (I_INPCK(info->tty))
                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)
        struct esp_struct *info = (struct esp_struct *)tty->driver_data;
        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);
 
        spin_lock_irqsave(&info->lock, flags);
index 7b279d1de4a2eac8d6781269eb4b52f738d5cc5a..809409922996413f5668581cf9033ffd62a155c0 100644 (file)
@@ -1753,9 +1753,6 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
                return;
 
        tiosp = tty->termios;
-       if ((tiosp->c_cflag == old->c_cflag) &&
-           (tiosp->c_iflag == old->c_iflag))
-               return;
 
        stli_mkasyport(portp, &aport, tiosp);
        stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
index 5953a45d7e96026340a120721e426ba9605c0258..2aee3fef0416cc6d689b428371761d12504afd01 100644 (file)
@@ -90,8 +90,6 @@
 #define UART_MCR_AFE           0x20
 #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)
 
@@ -1729,16 +1727,12 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
        struct mxser_struct *info = tty->driver_data;
        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) &&
-                               !(tty->termios->c_cflag & CRTSCTS)) {
-                       tty->hw_stopped = 0;
-                       mxser_start(tty);
-               }
+       if ((old_termios->c_cflag & CRTSCTS) &&
+                       !(tty->termios->c_cflag & CRTSCTS)) {
+               tty->hw_stopped = 0;
+               mxser_start(tty);
        }
 
 /* Handle sw stopped */
index 71b965705177f4a9bb3a722bb8819d531c1904c8..6a563932ba191f31efbec7e1f4d088dc1ef44fb3 100644 (file)
@@ -72,8 +72,6 @@
 #define UART_MCR_AFE           0x20
 #define UART_LSR_SPECIAL       0x1E
 
-#define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
-                                         IXON|IXOFF))
 
 #define C168_ASIC_ID    1
 #define C104_ASIC_ID    2
@@ -1990,18 +1988,14 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
        struct mxser_port *info = tty->driver_data;
        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);
-               mxser_change_speed(info, old_termios);
-               spin_unlock_irqrestore(&info->slock, flags);
+       spin_lock_irqsave(&info->slock, flags);
+       mxser_change_speed(info, old_termios);
+       spin_unlock_irqrestore(&info->slock, flags);
 
-               if ((old_termios->c_cflag & CRTSCTS) &&
-                               !(tty->termios->c_cflag & CRTSCTS)) {
-                       tty->hw_stopped = 0;
-                       mxser_start(tty);
-               }
+       if ((old_termios->c_cflag & CRTSCTS) &&
+                       !(tty->termios->c_cflag & CRTSCTS)) {
+               tty->hw_stopped = 0;
+               mxser_start(tty);
        }
 
        /* Handle sw stopped */