aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPhilippe Proulx <philippe.proulx@savoirfairelinux.com>2013-10-23 18:49:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 19:34:11 -0400
commite5f9bf72efbcaaf7e909cd6b948e43878a27c4e5 (patch)
treee07fb37c68b25b83fb07669327850afd3190ebfa /drivers/tty
parent018e7448f2b2beba4a58f4c7fe99a5b32542be4c (diff)
serial: omap: fix a few checkpatch warnings
Signed-off-by: Philippe Proulx <philippe.proulx@savoirfairelinux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/omap-serial.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index e42eb1e5a21a..97c07f68cca0 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -177,7 +177,7 @@ struct uart_omap_port {
177 bool is_suspending; 177 bool is_suspending;
178}; 178};
179 179
180#define to_uart_omap_port(p) ((container_of((p), struct uart_omap_port, port))) 180#define to_uart_omap_port(p) ((container_of((p), struct uart_omap_port, port)))
181 181
182static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS]; 182static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
183 183
@@ -257,9 +257,9 @@ serial_omap_baud_is_mode16(struct uart_port *port, unsigned int baud)
257 unsigned int n16 = port->uartclk / (16 * baud); 257 unsigned int n16 = port->uartclk / (16 * baud);
258 int baudAbsDiff13 = baud - (port->uartclk / (13 * n13)); 258 int baudAbsDiff13 = baud - (port->uartclk / (13 * n13));
259 int baudAbsDiff16 = baud - (port->uartclk / (16 * n16)); 259 int baudAbsDiff16 = baud - (port->uartclk / (16 * n16));
260 if(baudAbsDiff13 < 0) 260 if (baudAbsDiff13 < 0)
261 baudAbsDiff13 = -baudAbsDiff13; 261 baudAbsDiff13 = -baudAbsDiff13;
262 if(baudAbsDiff16 < 0) 262 if (baudAbsDiff16 < 0)
263 baudAbsDiff16 = -baudAbsDiff16; 263 baudAbsDiff16 = -baudAbsDiff16;
264 264
265 return (baudAbsDiff13 >= baudAbsDiff16); 265 return (baudAbsDiff13 >= baudAbsDiff16);
@@ -316,9 +316,8 @@ static void serial_omap_stop_tx(struct uart_port *port)
316 serial_out(up, UART_OMAP_SCR, up->scr); 316 serial_out(up, UART_OMAP_SCR, up->scr);
317 res = (up->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0; 317 res = (up->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0;
318 if (gpio_get_value(up->rts_gpio) != res) { 318 if (gpio_get_value(up->rts_gpio) != res) {
319 if (up->rs485.delay_rts_after_send > 0) { 319 if (up->rs485.delay_rts_after_send > 0)
320 mdelay(up->rs485.delay_rts_after_send); 320 mdelay(up->rs485.delay_rts_after_send);
321 }
322 gpio_set_value(up->rts_gpio, res); 321 gpio_set_value(up->rts_gpio, res);
323 } 322 }
324 } else { 323 } else {
@@ -422,9 +421,8 @@ static void serial_omap_start_tx(struct uart_port *port)
422 res = (up->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0; 421 res = (up->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0;
423 if (gpio_get_value(up->rts_gpio) != res) { 422 if (gpio_get_value(up->rts_gpio) != res) {
424 gpio_set_value(up->rts_gpio, res); 423 gpio_set_value(up->rts_gpio, res);
425 if (up->rs485.delay_rts_before_send > 0) { 424 if (up->rs485.delay_rts_before_send > 0)
426 mdelay(up->rs485.delay_rts_before_send); 425 mdelay(up->rs485.delay_rts_before_send);
427 }
428 } 426 }
429 } 427 }
430 428
@@ -1724,8 +1722,9 @@ static int serial_omap_probe(struct platform_device *pdev)
1724 up->port.uartclk = omap_up_info->uartclk; 1722 up->port.uartclk = omap_up_info->uartclk;
1725 if (!up->port.uartclk) { 1723 if (!up->port.uartclk) {
1726 up->port.uartclk = DEFAULT_CLK_SPEED; 1724 up->port.uartclk = DEFAULT_CLK_SPEED;
1727 dev_warn(&pdev->dev, "No clock speed specified: using default:" 1725 dev_warn(&pdev->dev,
1728 "%d\n", DEFAULT_CLK_SPEED); 1726 "No clock speed specified: using default: %d\n"
1727 DEFAULT_CLK_SPEED);
1729 } 1728 }
1730 1729
1731 up->latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE; 1730 up->latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;