When CONFIG_S5J_UARTx is not set, compiler complains as following:
CC: chip/s5j_serial.c
chip/s5j_serial.c: In function 'up_setup':
chip/s5j_serial.c:1016:12: error: 'g_uart0priv' undeclared (first use in this function)
priv = &g_uart0priv;
^
chip/s5j_serial.c:1016:12: note: each undeclared identifier is reported only once for each function it appears in
chip/s5j_serial.c:1019:12: error: 'g_uart1priv' undeclared (first use in this function)
priv = &g_uart1priv;
^
chip/s5j_serial.c:1022:12: error: 'g_uart2priv' undeclared (first use in this function)
priv = &g_uart2priv;
^
chip/s5j_serial.c:1025:12: error: 'g_uart3priv' undeclared (first use in this function)
priv = &g_uart3priv;
^
Makefile:175: recipe for target 's5j_serial.o' failed
make[1]: *** [s5j_serial.o] Error 1
This commit fixes this.
Change-Id: Ifd56c89547071e1a96765e32cea984ac7234d181
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
/* Initialize UART */
switch (priv->eCh) {
+#ifdef CONFIG_S5J_UART0
case UART0:
priv = &g_uart0priv;
break;
+#endif
+#ifdef CONFIG_S5J_UART1
case UART1:
priv = &g_uart1priv;
break;
+#endif
+#ifdef CONFIG_S5J_UART2
case UART2:
priv = &g_uart2priv;
break;
+#endif
+#ifdef CONFIG_S5J_UART3
case UART3:
priv = &g_uart3priv;
break;
+#endif
+#ifdef CONFIG_S5J_UARTDBG
case UARTDBG:
default:
priv = &g_uartdbgpriv;
break;
+#endif
}
/* wait until every characters from earlier stage bootloader get out */