diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2014-11-24 01:56:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-25 20:06:39 -0500 |
commit | ef4aca704836920fe16f50e4d859e22162f6e8f7 (patch) | |
tree | 3158b55e02e1da1494103d7d9bc5fafeb08efeef | |
parent | 1ff383a4c3eda8893ec61b02831826e1b1f46b41 (diff) |
serial: samsung: fix style problems
Split lines longer than 80 chars and remove unnecessary whitespaces.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/samsung.c | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index d36b2bd39e30..33a953e4cf16 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -199,12 +199,14 @@ static void s3c24xx_serial_stop_rx(struct uart_port *port) | |||
199 | } | 199 | } |
200 | } | 200 | } |
201 | 201 | ||
202 | static inline struct s3c24xx_uart_info *s3c24xx_port_to_info(struct uart_port *port) | 202 | static inline struct s3c24xx_uart_info |
203 | *s3c24xx_port_to_info(struct uart_port *port) | ||
203 | { | 204 | { |
204 | return to_ourport(port)->info; | 205 | return to_ourport(port)->info; |
205 | } | 206 | } |
206 | 207 | ||
207 | static inline struct s3c2410_uartcfg *s3c24xx_port_to_cfg(struct uart_port *port) | 208 | static inline struct s3c2410_uartcfg |
209 | *s3c24xx_port_to_cfg(struct uart_port *port) | ||
208 | { | 210 | { |
209 | struct s3c24xx_uart_port *ourport; | 211 | struct s3c24xx_uart_port *ourport; |
210 | 212 | ||
@@ -311,14 +313,14 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id) | |||
311 | uart_insert_char(port, uerstat, S3C2410_UERSTAT_OVERRUN, | 313 | uart_insert_char(port, uerstat, S3C2410_UERSTAT_OVERRUN, |
312 | ch, flag); | 314 | ch, flag); |
313 | 315 | ||
314 | ignore_char: | 316 | ignore_char: |
315 | continue; | 317 | continue; |
316 | } | 318 | } |
317 | 319 | ||
318 | spin_unlock_irqrestore(&port->lock, flags); | 320 | spin_unlock_irqrestore(&port->lock, flags); |
319 | tty_flip_buffer_push(&port->state->port); | 321 | tty_flip_buffer_push(&port->state->port); |
320 | 322 | ||
321 | out: | 323 | out: |
322 | return IRQ_HANDLED; | 324 | return IRQ_HANDLED; |
323 | } | 325 | } |
324 | 326 | ||
@@ -368,7 +370,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id) | |||
368 | if (uart_circ_empty(xmit)) | 370 | if (uart_circ_empty(xmit)) |
369 | s3c24xx_serial_stop_tx(port); | 371 | s3c24xx_serial_stop_tx(port); |
370 | 372 | ||
371 | out: | 373 | out: |
372 | spin_unlock_irqrestore(&port->lock, flags); | 374 | spin_unlock_irqrestore(&port->lock, flags); |
373 | return IRQ_HANDLED; | 375 | return IRQ_HANDLED; |
374 | } | 376 | } |
@@ -519,7 +521,7 @@ static int s3c24xx_serial_startup(struct uart_port *port) | |||
519 | 521 | ||
520 | return ret; | 522 | return ret; |
521 | 523 | ||
522 | err: | 524 | err: |
523 | s3c24xx_serial_shutdown(port); | 525 | s3c24xx_serial_shutdown(port); |
524 | return ret; | 526 | return ret; |
525 | } | 527 | } |
@@ -845,8 +847,8 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, | |||
845 | */ | 847 | */ |
846 | port->read_status_mask = S3C2410_UERSTAT_OVERRUN; | 848 | port->read_status_mask = S3C2410_UERSTAT_OVERRUN; |
847 | if (termios->c_iflag & INPCK) | 849 | if (termios->c_iflag & INPCK) |
848 | port->read_status_mask |= S3C2410_UERSTAT_FRAME | S3C2410_UERSTAT_PARITY; | 850 | port->read_status_mask |= S3C2410_UERSTAT_FRAME | |
849 | 851 | S3C2410_UERSTAT_PARITY; | |
850 | /* | 852 | /* |
851 | * Which character status flags should we ignore? | 853 | * Which character status flags should we ignore? |
852 | */ | 854 | */ |
@@ -973,10 +975,13 @@ static struct uart_driver s3c24xx_uart_drv = { | |||
973 | .minor = S3C24XX_SERIAL_MINOR, | 975 | .minor = S3C24XX_SERIAL_MINOR, |
974 | }; | 976 | }; |
975 | 977 | ||
976 | static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = { | 978 | #define __PORT_LOCK_UNLOCKED(i) \ |
979 | __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[i].port.lock) | ||
980 | static struct s3c24xx_uart_port | ||
981 | s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = { | ||
977 | [0] = { | 982 | [0] = { |
978 | .port = { | 983 | .port = { |
979 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[0].port.lock), | 984 | .lock = __PORT_LOCK_UNLOCKED(0), |
980 | .iotype = UPIO_MEM, | 985 | .iotype = UPIO_MEM, |
981 | .uartclk = 0, | 986 | .uartclk = 0, |
982 | .fifosize = 16, | 987 | .fifosize = 16, |
@@ -987,7 +992,7 @@ static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS | |||
987 | }, | 992 | }, |
988 | [1] = { | 993 | [1] = { |
989 | .port = { | 994 | .port = { |
990 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[1].port.lock), | 995 | .lock = __PORT_LOCK_UNLOCKED(1), |
991 | .iotype = UPIO_MEM, | 996 | .iotype = UPIO_MEM, |
992 | .uartclk = 0, | 997 | .uartclk = 0, |
993 | .fifosize = 16, | 998 | .fifosize = 16, |
@@ -1000,7 +1005,7 @@ static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS | |||
1000 | 1005 | ||
1001 | [2] = { | 1006 | [2] = { |
1002 | .port = { | 1007 | .port = { |
1003 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[2].port.lock), | 1008 | .lock = __PORT_LOCK_UNLOCKED(2), |
1004 | .iotype = UPIO_MEM, | 1009 | .iotype = UPIO_MEM, |
1005 | .uartclk = 0, | 1010 | .uartclk = 0, |
1006 | .fifosize = 16, | 1011 | .fifosize = 16, |
@@ -1013,7 +1018,7 @@ static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS | |||
1013 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 3 | 1018 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 3 |
1014 | [3] = { | 1019 | [3] = { |
1015 | .port = { | 1020 | .port = { |
1016 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[3].port.lock), | 1021 | .lock = __PORT_LOCK_UNLOCKED(3), |
1017 | .iotype = UPIO_MEM, | 1022 | .iotype = UPIO_MEM, |
1018 | .uartclk = 0, | 1023 | .uartclk = 0, |
1019 | .fifosize = 16, | 1024 | .fifosize = 16, |
@@ -1024,6 +1029,7 @@ static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS | |||
1024 | } | 1029 | } |
1025 | #endif | 1030 | #endif |
1026 | }; | 1031 | }; |
1032 | #undef __PORT_LOCK_UNLOCKED | ||
1027 | 1033 | ||
1028 | /* s3c24xx_serial_resetport | 1034 | /* s3c24xx_serial_resetport |
1029 | * | 1035 | * |
@@ -1106,11 +1112,12 @@ static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb, | |||
1106 | s3c24xx_serial_set_termios(uport, termios, NULL); | 1112 | s3c24xx_serial_set_termios(uport, termios, NULL); |
1107 | } | 1113 | } |
1108 | 1114 | ||
1109 | exit: | 1115 | exit: |
1110 | return 0; | 1116 | return 0; |
1111 | } | 1117 | } |
1112 | 1118 | ||
1113 | static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) | 1119 | static inline int |
1120 | s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) | ||
1114 | { | 1121 | { |
1115 | port->freq_transition.notifier_call = s3c24xx_serial_cpufreq_transition; | 1122 | port->freq_transition.notifier_call = s3c24xx_serial_cpufreq_transition; |
1116 | 1123 | ||
@@ -1118,19 +1125,22 @@ static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port | |||
1118 | CPUFREQ_TRANSITION_NOTIFIER); | 1125 | CPUFREQ_TRANSITION_NOTIFIER); |
1119 | } | 1126 | } |
1120 | 1127 | ||
1121 | static inline void s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) | 1128 | static inline void |
1129 | s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) | ||
1122 | { | 1130 | { |
1123 | cpufreq_unregister_notifier(&port->freq_transition, | 1131 | cpufreq_unregister_notifier(&port->freq_transition, |
1124 | CPUFREQ_TRANSITION_NOTIFIER); | 1132 | CPUFREQ_TRANSITION_NOTIFIER); |
1125 | } | 1133 | } |
1126 | 1134 | ||
1127 | #else | 1135 | #else |
1128 | static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) | 1136 | static inline int |
1137 | s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) | ||
1129 | { | 1138 | { |
1130 | return 0; | 1139 | return 0; |
1131 | } | 1140 | } |
1132 | 1141 | ||
1133 | static inline void s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) | 1142 | static inline void |
1143 | s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) | ||
1134 | { | 1144 | { |
1135 | } | 1145 | } |
1136 | #endif | 1146 | #endif |