Commit bcfa46bf authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Greg Kroah-Hartman

tty: serial: fsl_lpuart: Drop unnecessary extra parenthesis

Drop unnecessary extra parenthesis in the driver.
Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Cory Tusar <cory.tusar@zii.aero>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-imx@nxp.com
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20190729195226.8862-12-andrew.smirnov@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d26454ee
...@@ -1443,7 +1443,7 @@ static int lpuart_startup(struct uart_port *port) ...@@ -1443,7 +1443,7 @@ static int lpuart_startup(struct uart_port *port)
lpuart_setup_watermark(sport); lpuart_setup_watermark(sport);
temp = readb(sport->port.membase + UARTCR2); temp = readb(sport->port.membase + UARTCR2);
temp |= (UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE); temp |= UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE;
writeb(temp, sport->port.membase + UARTCR2); writeb(temp, sport->port.membase + UARTCR2);
if (sport->dma_rx_chan && !lpuart_start_rx_dma(sport)) { if (sport->dma_rx_chan && !lpuart_start_rx_dma(sport)) {
...@@ -1651,7 +1651,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -1651,7 +1651,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
termios->c_cflag &= ~CRTSCTS; termios->c_cflag &= ~CRTSCTS;
if (termios->c_cflag & CRTSCTS) if (termios->c_cflag & CRTSCTS)
modem |= (UARTMODEM_RXRTSE | UARTMODEM_TXCTSE); modem |= UARTMODEM_RXRTSE | UARTMODEM_TXCTSE;
else else
modem &= ~(UARTMODEM_RXRTSE | UARTMODEM_TXCTSE); modem &= ~(UARTMODEM_RXRTSE | UARTMODEM_TXCTSE);
...@@ -1662,7 +1662,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -1662,7 +1662,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
if ((termios->c_cflag & CSIZE) == CS7) if ((termios->c_cflag & CSIZE) == CS7)
termios->c_cflag |= PARENB; termios->c_cflag |= PARENB;
if ((termios->c_cflag & PARENB)) { if (termios->c_cflag & PARENB) {
if (termios->c_cflag & CMSPAR) { if (termios->c_cflag & CMSPAR) {
cr1 &= ~UARTCR1_PE; cr1 &= ~UARTCR1_PE;
if (termios->c_cflag & PARODD) if (termios->c_cflag & PARODD)
...@@ -1701,7 +1701,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -1701,7 +1701,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
sport->port.read_status_mask = 0; sport->port.read_status_mask = 0;
if (termios->c_iflag & INPCK) if (termios->c_iflag & INPCK)
sport->port.read_status_mask |= (UARTSR1_FE | UARTSR1_PE); sport->port.read_status_mask |= UARTSR1_FE | UARTSR1_PE;
if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK))
sport->port.read_status_mask |= UARTSR1_FE; sport->port.read_status_mask |= UARTSR1_FE;
...@@ -1815,7 +1815,7 @@ lpuart32_serial_setbrg(struct lpuart_port *sport, unsigned int baudrate) ...@@ -1815,7 +1815,7 @@ lpuart32_serial_setbrg(struct lpuart_port *sport, unsigned int baudrate)
tmp |= UARTBAUD_BOTHEDGE; tmp |= UARTBAUD_BOTHEDGE;
tmp &= ~(UARTBAUD_OSR_MASK << UARTBAUD_OSR_SHIFT); tmp &= ~(UARTBAUD_OSR_MASK << UARTBAUD_OSR_SHIFT);
tmp |= (((osr-1) & UARTBAUD_OSR_MASK) << UARTBAUD_OSR_SHIFT); tmp |= ((osr-1) & UARTBAUD_OSR_MASK) << UARTBAUD_OSR_SHIFT;
tmp &= ~UARTBAUD_SBR_MASK; tmp &= ~UARTBAUD_SBR_MASK;
tmp |= sbr & UARTBAUD_SBR_MASK; tmp |= sbr & UARTBAUD_SBR_MASK;
...@@ -1868,7 +1868,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -1868,7 +1868,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
} }
if (termios->c_cflag & CRTSCTS) { if (termios->c_cflag & CRTSCTS) {
modem |= (UARTMODEM_RXRTSE | UARTMODEM_TXCTSE); modem |= UARTMODEM_RXRTSE | UARTMODEM_TXCTSE;
} else { } else {
termios->c_cflag &= ~CRTSCTS; termios->c_cflag &= ~CRTSCTS;
modem &= ~(UARTMODEM_RXRTSE | UARTMODEM_TXCTSE); modem &= ~(UARTMODEM_RXRTSE | UARTMODEM_TXCTSE);
...@@ -1917,7 +1917,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -1917,7 +1917,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
sport->port.read_status_mask = 0; sport->port.read_status_mask = 0;
if (termios->c_iflag & INPCK) if (termios->c_iflag & INPCK)
sport->port.read_status_mask |= (UARTSTAT_FE | UARTSTAT_PE); sport->port.read_status_mask |= UARTSTAT_FE | UARTSTAT_PE;
if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK))
sport->port.read_status_mask |= UARTSTAT_FE; sport->port.read_status_mask |= UARTSTAT_FE;
...@@ -2084,7 +2084,7 @@ lpuart_console_write(struct console *co, const char *s, unsigned int count) ...@@ -2084,7 +2084,7 @@ lpuart_console_write(struct console *co, const char *s, unsigned int count)
/* first save CR2 and then disable interrupts */ /* first save CR2 and then disable interrupts */
cr2 = old_cr2 = readb(sport->port.membase + UARTCR2); cr2 = old_cr2 = readb(sport->port.membase + UARTCR2);
cr2 |= (UARTCR2_TE | UARTCR2_RE); cr2 |= UARTCR2_TE | UARTCR2_RE;
cr2 &= ~(UARTCR2_TIE | UARTCR2_TCIE | UARTCR2_RIE); cr2 &= ~(UARTCR2_TIE | UARTCR2_TCIE | UARTCR2_RIE);
writeb(cr2, sport->port.membase + UARTCR2); writeb(cr2, sport->port.membase + UARTCR2);
...@@ -2115,7 +2115,7 @@ lpuart32_console_write(struct console *co, const char *s, unsigned int count) ...@@ -2115,7 +2115,7 @@ lpuart32_console_write(struct console *co, const char *s, unsigned int count)
/* first save CR2 and then disable interrupts */ /* first save CR2 and then disable interrupts */
cr = old_cr = lpuart32_read(&sport->port, UARTCTRL); cr = old_cr = lpuart32_read(&sport->port, UARTCTRL);
cr |= (UARTCTRL_TE | UARTCTRL_RE); cr |= UARTCTRL_TE | UARTCTRL_RE;
cr &= ~(UARTCTRL_TIE | UARTCTRL_TCIE | UARTCTRL_RIE); cr &= ~(UARTCTRL_TIE | UARTCTRL_TCIE | UARTCTRL_RIE);
lpuart32_write(&sport->port, cr, UARTCTRL); lpuart32_write(&sport->port, cr, UARTCTRL);
...@@ -2572,7 +2572,7 @@ static int lpuart_resume(struct device *dev) ...@@ -2572,7 +2572,7 @@ static int lpuart_resume(struct device *dev)
} else { } else {
lpuart_setup_watermark(sport); lpuart_setup_watermark(sport);
temp = readb(sport->port.membase + UARTCR2); temp = readb(sport->port.membase + UARTCR2);
temp |= (UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE); temp |= UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE;
writeb(temp, sport->port.membase + UARTCR2); writeb(temp, sport->port.membase + UARTCR2);
} }
......
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