aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-03-10 11:46:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-11 08:55:20 -0400
commit12fe59f975b9b36a17eced4c4d33911ee9bc9f7a (patch)
tree088ce7fbc096399786005a1a7643862ca1e3f6f1 /drivers/tty/serial/imx.c
parent13bc2bb9a0075342707e853e6dac298f0bbca111 (diff)
serial: imx: Add braces to avoid ambiguous 'else'
Commit 17b8f2a3fdca29 ("serial: imx: add support for half duplex rs485") introduced the following build warning: drivers/tty/serial/imx.c: In function 'imx_set_termios': drivers/tty/serial/imx.c:1301:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] Add the suggested braces to avoid the build warning. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index ddfb672d0152..c8cfa0637128 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1298,7 +1298,7 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
1298 if (sport->have_rtscts) { 1298 if (sport->have_rtscts) {
1299 ucr2 &= ~UCR2_IRTS; 1299 ucr2 &= ~UCR2_IRTS;
1300 1300
1301 if (port->rs485.flags & SER_RS485_ENABLED) 1301 if (port->rs485.flags & SER_RS485_ENABLED) {
1302 /* 1302 /*
1303 * RTS is mandatory for rs485 operation, so keep 1303 * RTS is mandatory for rs485 operation, so keep
1304 * it under manual control and keep transmitter 1304 * it under manual control and keep transmitter
@@ -1307,9 +1307,9 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
1307 if (!(port->rs485.flags & 1307 if (!(port->rs485.flags &
1308 SER_RS485_RTS_AFTER_SEND)) 1308 SER_RS485_RTS_AFTER_SEND))
1309 ucr2 |= UCR2_CTS; 1309 ucr2 |= UCR2_CTS;
1310 else 1310 } else {
1311 ucr2 |= UCR2_CTSC; 1311 ucr2 |= UCR2_CTSC;
1312 1312 }
1313 } else { 1313 } else {
1314 termios->c_cflag &= ~CRTSCTS; 1314 termios->c_cflag &= ~CRTSCTS;
1315 } 1315 }