Blackfin serial driver: decouple PARODD and CMSPAR checking from PARENB
authorMike Frysinger <michael.frysinger@analog.com>
Mon, 11 Jun 2007 08:16:45 +0000 (16:16 +0800)
committerBryan Wu <bryan.wu@analog.com>
Mon, 11 Jun 2007 08:16:45 +0000 (16:16 +0800)
as the termios info does not stipulate that the former are dependent on the latter

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
drivers/serial/bfin_5xx.c

index a9d202717829df29489387da0bf636e8d92eb4c0..22569bd5d821e37e7f0b9f5aaaf15909831032dc 100644 (file)
@@ -635,13 +635,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 
        if (termios->c_cflag & CSTOPB)
                lcr |= STB;
-       if (termios->c_cflag & PARENB) {
+       if (termios->c_cflag & PARENB)
                lcr |= PEN;
-               if (!(termios->c_cflag & PARODD))
-                       lcr |= EPS;
-               if (termios->c_cflag & CMSPAR)
-                       lcr |= STP;
-       }
+       if (!(termios->c_cflag & PARODD))
+               lcr |= EPS;
+       if (termios->c_cflag & CMSPAR)
+               lcr |= STP;
 
        port->read_status_mask = OE;
        if (termios->c_iflag & INPCK)