aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorOskar Schirmer <os@emlix.com>2009-06-11 09:35:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 11:51:07 -0400
commitd3810cd4d7064b109574374f73c41b11b481dbf2 (patch)
treeda54a8ac0d87f3c0da9fe38d8401eb5e943540c2 /drivers/serial
parent3e3b5c087799e536871c8261b05bc28e4783c8da (diff)
imx: serial: fix whitespaces (no changes in functionality)
Signed-off-by: Oskar Schirmer <os@emlix.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/imx.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 5f0be40dfdab..76c8fa1884ec 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -302,8 +302,7 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
302 /* send xmit->buf[xmit->tail] 302 /* send xmit->buf[xmit->tail]
303 * out the port here */ 303 * out the port here */
304 writel(xmit->buf[xmit->tail], sport->port.membase + URTX0); 304 writel(xmit->buf[xmit->tail], sport->port.membase + URTX0);
305 xmit->tail = (xmit->tail + 1) & 305 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
306 (UART_XMIT_SIZE - 1);
307 sport->port.icount.tx++; 306 sport->port.icount.tx++;
308 if (uart_circ_empty(xmit)) 307 if (uart_circ_empty(xmit))
309 break; 308 break;
@@ -395,8 +394,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
395 continue; 394 continue;
396 } 395 }
397 396
398 if (uart_handle_sysrq_char 397 if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx))
399 (&sport->port, (unsigned char)rx))
400 continue; 398 continue;
401 399
402 if (rx & (URXD_PRERR | URXD_OVRRUN | URXD_FRMERR) ) { 400 if (rx & (URXD_PRERR | URXD_OVRRUN | URXD_FRMERR) ) {
@@ -471,26 +469,26 @@ static unsigned int imx_tx_empty(struct uart_port *port)
471 */ 469 */
472static unsigned int imx_get_mctrl(struct uart_port *port) 470static unsigned int imx_get_mctrl(struct uart_port *port)
473{ 471{
474 struct imx_port *sport = (struct imx_port *)port; 472 struct imx_port *sport = (struct imx_port *)port;
475 unsigned int tmp = TIOCM_DSR | TIOCM_CAR; 473 unsigned int tmp = TIOCM_DSR | TIOCM_CAR;
476 474
477 if (readl(sport->port.membase + USR1) & USR1_RTSS) 475 if (readl(sport->port.membase + USR1) & USR1_RTSS)
478 tmp |= TIOCM_CTS; 476 tmp |= TIOCM_CTS;
479 477
480 if (readl(sport->port.membase + UCR2) & UCR2_CTS) 478 if (readl(sport->port.membase + UCR2) & UCR2_CTS)
481 tmp |= TIOCM_RTS; 479 tmp |= TIOCM_RTS;
482 480
483 return tmp; 481 return tmp;
484} 482}
485 483
486static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl) 484static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
487{ 485{
488 struct imx_port *sport = (struct imx_port *)port; 486 struct imx_port *sport = (struct imx_port *)port;
489 unsigned long temp; 487 unsigned long temp;
490 488
491 temp = readl(sport->port.membase + UCR2) & ~UCR2_CTS; 489 temp = readl(sport->port.membase + UCR2) & ~UCR2_CTS;
492 490
493 if (mctrl & TIOCM_RTS) 491 if (mctrl & TIOCM_RTS)
494 temp |= UCR2_CTS; 492 temp |= UCR2_CTS;
495 493
496 writel(temp, sport->port.membase + UCR2); 494 writel(temp, sport->port.membase + UCR2);
@@ -1072,22 +1070,22 @@ static struct uart_driver imx_reg = {
1072 1070
1073static int serial_imx_suspend(struct platform_device *dev, pm_message_t state) 1071static int serial_imx_suspend(struct platform_device *dev, pm_message_t state)
1074{ 1072{
1075 struct imx_port *sport = platform_get_drvdata(dev); 1073 struct imx_port *sport = platform_get_drvdata(dev);
1076 1074
1077 if (sport) 1075 if (sport)
1078 uart_suspend_port(&imx_reg, &sport->port); 1076 uart_suspend_port(&imx_reg, &sport->port);
1079 1077
1080 return 0; 1078 return 0;
1081} 1079}
1082 1080
1083static int serial_imx_resume(struct platform_device *dev) 1081static int serial_imx_resume(struct platform_device *dev)
1084{ 1082{
1085 struct imx_port *sport = platform_get_drvdata(dev); 1083 struct imx_port *sport = platform_get_drvdata(dev);
1086 1084
1087 if (sport) 1085 if (sport)
1088 uart_resume_port(&imx_reg, &sport->port); 1086 uart_resume_port(&imx_reg, &sport->port);
1089 1087
1090 return 0; 1088 return 0;
1091} 1089}
1092 1090
1093static int serial_imx_probe(struct platform_device *pdev) 1091static int serial_imx_probe(struct platform_device *pdev)
@@ -1143,7 +1141,7 @@ static int serial_imx_probe(struct platform_device *pdev)
1143 imx_ports[pdev->id] = sport; 1141 imx_ports[pdev->id] = sport;
1144 1142
1145 pdata = pdev->dev.platform_data; 1143 pdata = pdev->dev.platform_data;
1146 if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) 1144 if (pdata && (pdata->flags & IMXUART_HAVE_RTSCTS))
1147 sport->have_rtscts = 1; 1145 sport->have_rtscts = 1;
1148 1146
1149 if (pdata->init) { 1147 if (pdata->init) {
@@ -1193,13 +1191,13 @@ static int serial_imx_remove(struct platform_device *pdev)
1193} 1191}
1194 1192
1195static struct platform_driver serial_imx_driver = { 1193static struct platform_driver serial_imx_driver = {
1196 .probe = serial_imx_probe, 1194 .probe = serial_imx_probe,
1197 .remove = serial_imx_remove, 1195 .remove = serial_imx_remove,
1198 1196
1199 .suspend = serial_imx_suspend, 1197 .suspend = serial_imx_suspend,
1200 .resume = serial_imx_resume, 1198 .resume = serial_imx_resume,
1201 .driver = { 1199 .driver = {
1202 .name = "imx-uart", 1200 .name = "imx-uart",
1203 .owner = THIS_MODULE, 1201 .owner = THIS_MODULE,
1204 }, 1202 },
1205}; 1203};