summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2012-10-29 13:34:47 +0000
committerTom Rini <trini@ti.com>2012-11-04 11:00:38 -0700
commitac63f2a2ecb24e309c2ca3b7b4c91b1941d3038b (patch)
tree6ca0c7273421f7bea8f48f796f665b08c8773b81
parent7d2ab9ae4e3a3eac81cf88d752a0cdedb70bd534 (diff)
downloadu-boot-imx-ac63f2a2ecb24e309c2ca3b7b4c91b1941d3038b.zip
u-boot-imx-ac63f2a2ecb24e309c2ca3b7b4c91b1941d3038b.tar.gz
u-boot-imx-ac63f2a2ecb24e309c2ca3b7b4c91b1941d3038b.tar.bz2
drivers/serial/serial_ns16550.c: sparse fixes
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
-rw-r--r--drivers/serial/serial_ns16550.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 4176e25..bf280ba 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -78,21 +78,33 @@ static NS16550_t serial_ports[4] = {
/* Multi serial device functions */
#define DECLARE_ESERIAL_FUNCTIONS(port) \
- static int eserial##port##_init (void) {\
- int clock_divisor; \
- clock_divisor = calc_divisor(serial_ports[port-1]); \
- NS16550_init(serial_ports[port-1], clock_divisor); \
- return(0);}\
- static void eserial##port##_setbrg (void) {\
- serial_setbrg_dev(port);}\
- static int eserial##port##_getc (void) {\
- return serial_getc_dev(port);}\
- static int eserial##port##_tstc (void) {\
- return serial_tstc_dev(port);}\
- static void eserial##port##_putc (const char c) {\
- serial_putc_dev(port, c);}\
- static void eserial##port##_puts (const char *s) {\
- serial_puts_dev(port, s);}
+ static int eserial##port##_init(void) \
+ { \
+ int clock_divisor; \
+ clock_divisor = calc_divisor(serial_ports[port-1]); \
+ NS16550_init(serial_ports[port-1], clock_divisor); \
+ return 0 ; \
+ } \
+ static void eserial##port##_setbrg(void) \
+ { \
+ serial_setbrg_dev(port); \
+ } \
+ static int eserial##port##_getc(void) \
+ { \
+ return serial_getc_dev(port); \
+ } \
+ static int eserial##port##_tstc(void) \
+ { \
+ return serial_tstc_dev(port); \
+ } \
+ static void eserial##port##_putc(const char c) \
+ { \
+ serial_putc_dev(port, c); \
+ } \
+ static void eserial##port##_puts(const char *s) \
+ { \
+ serial_puts_dev(port, s); \
+ }
/* Serial device descriptor */
#define INIT_ESERIAL_STRUCTURE(port, __name) { \