aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2011-07-19 06:09:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 13:42:57 -0400
commitbb7e58f89617861c3dbfde2edcfd08b4044ede67 (patch)
treef4933122ec5c7fb1ede268de30e3072aa2fe841a
parent8bab534b508230f33be5f7ba8492923754274a8d (diff)
serial:blackfin: Correct coding style in bfin serial driver.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/tty/serial/bfin_5xx.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c
index ff6979181ac5..e08bc046c1bd 100644
--- a/drivers/tty/serial/bfin_5xx.c
+++ b/drivers/tty/serial/bfin_5xx.c
@@ -234,8 +234,8 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
234 status = UART_GET_LSR(uart); 234 status = UART_GET_LSR(uart);
235 UART_CLEAR_LSR(uart); 235 UART_CLEAR_LSR(uart);
236 236
237 ch = UART_GET_CHAR(uart); 237 ch = UART_GET_CHAR(uart);
238 uart->port.icount.rx++; 238 uart->port.icount.rx++;
239 239
240#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \ 240#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
241 defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE) 241 defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
@@ -739,9 +739,8 @@ static int bfin_serial_startup(struct uart_port *port)
739 pr_info("Unable to attach BlackFin UART CTS interrupt. So, disable it.\n"); 739 pr_info("Unable to attach BlackFin UART CTS interrupt. So, disable it.\n");
740 } 740 }
741 } 741 }
742 if (uart->rts_pin >= 0) { 742 if (uart->rts_pin >= 0)
743 gpio_direction_output(uart->rts_pin, 0); 743 gpio_direction_output(uart->rts_pin, 0);
744 }
745#endif 744#endif
746#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 745#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
747 if (uart->cts_pin >= 0 && request_irq(uart->status_irq, 746 if (uart->cts_pin >= 0 && request_irq(uart->status_irq,
@@ -1091,10 +1090,18 @@ bfin_serial_console_get_options(struct bfin_serial_port *uart, int *baud,
1091 *parity = 'o'; 1090 *parity = 'o';
1092 } 1091 }
1093 switch (lcr & 0x03) { 1092 switch (lcr & 0x03) {
1094 case 0: *bits = 5; break; 1093 case 0:
1095 case 1: *bits = 6; break; 1094 *bits = 5;
1096 case 2: *bits = 7; break; 1095 break;
1097 case 3: *bits = 8; break; 1096 case 1:
1097 *bits = 6;
1098 break;
1099 case 2:
1100 *bits = 7;
1101 break;
1102 case 3:
1103 *bits = 8;
1104 break;
1098 } 1105 }
1099 /* Set DLAB in LCR to Access DLL and DLH */ 1106 /* Set DLAB in LCR to Access DLL and DLH */
1100 UART_SET_DLAB(uart); 1107 UART_SET_DLAB(uart);
@@ -1183,7 +1190,7 @@ static struct console bfin_serial_console = {
1183 .index = -1, 1190 .index = -1,
1184 .data = &bfin_serial_reg, 1191 .data = &bfin_serial_reg,
1185}; 1192};
1186#define BFIN_SERIAL_CONSOLE &bfin_serial_console 1193#define BFIN_SERIAL_CONSOLE (&bfin_serial_console)
1187#else 1194#else
1188#define BFIN_SERIAL_CONSOLE NULL 1195#define BFIN_SERIAL_CONSOLE NULL
1189#endif /* CONFIG_SERIAL_BFIN_CONSOLE */ 1196#endif /* CONFIG_SERIAL_BFIN_CONSOLE */