[U-Boot] [PATCH v2 25/25] drivers/serial/serial_ns16550.c: sparse fixes

Kim Phillips kim.phillips at freescale.com
Tue Oct 30 00:34:47 CET 2012


Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
---
v2: checkpatch fixes.

 drivers/serial/serial_ns16550.c | 42 ++++++++++++++++++++++++++---------------
 1 file 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) {	\
-- 
1.8.0




More information about the U-Boot mailing list