File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 86
86
#ifdef CONFIG_UART0_SERIAL_CONSOLE
87
87
# define CONSOLE_DEV g_uart0port /* UART0 is console */
88
88
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
89
- #elif CONFIG_UART1_SERIAL_CONSOLE
89
+ #elif defined( CONFIG_UART1_SERIAL_CONSOLE )
90
90
# define CONSOLE_DEV g_uart1port /* UART1 is console */
91
91
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
92
92
#endif
@@ -773,10 +773,9 @@ void arm_serialinit(void)
773
773
/* Register the serial console */
774
774
775
775
uart_register ("/dev/console" , & CONSOLE_DEV );
776
- #endif
777
-
778
776
uart_register ("/dev/ttyS0" , & TTYS0_DEV );
779
777
minor = 1 ;
778
+ #endif
780
779
781
780
/* Register all remaining UARTs */
782
781
@@ -786,7 +785,7 @@ void arm_serialinit(void)
786
785
{
787
786
/* Don't create a device for non-configured ports. */
788
787
789
- if (g_uart_devs [i ] == 0 )
788
+ if (g_uart_devs [i ] == NULL )
790
789
{
791
790
continue ;
792
791
}
Original file line number Diff line number Diff line change 86
86
#ifdef CONFIG_UART0_SERIAL_CONSOLE
87
87
# define CONSOLE_DEV g_uart0port /* UART0 is console */
88
88
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
89
- #elif CONFIG_UART1_SERIAL_CONSOLE
89
+ #elif defined( CONFIG_UART1_SERIAL_CONSOLE )
90
90
# define CONSOLE_DEV g_uart1port /* UART1 is console */
91
91
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
92
92
#endif
@@ -773,10 +773,9 @@ void arm_serialinit(void)
773
773
/* Register the serial console */
774
774
775
775
uart_register ("/dev/console" , & CONSOLE_DEV );
776
- #endif
777
-
778
776
uart_register ("/dev/ttyS0" , & TTYS0_DEV );
779
777
minor = 1 ;
778
+ #endif
780
779
781
780
/* Register all remaining UARTs */
782
781
@@ -786,7 +785,7 @@ void arm_serialinit(void)
786
785
{
787
786
/* Don't create a device for non-configured ports. */
788
787
789
- if (g_uart_devs [i ] == 0 )
788
+ if (g_uart_devs [i ] == NULL )
790
789
{
791
790
continue ;
792
791
}
Original file line number Diff line number Diff line change 86
86
#ifdef CONFIG_UART0_SERIAL_CONSOLE
87
87
# define CONSOLE_DEV g_uart0port /* UART0 is console */
88
88
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
89
- #elif CONFIG_UART1_SERIAL_CONSOLE
89
+ #elif defined( CONFIG_UART1_SERIAL_CONSOLE )
90
90
# define CONSOLE_DEV g_uart1port /* UART1 is console */
91
91
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
92
92
#endif
@@ -773,10 +773,9 @@ void arm_serialinit(void)
773
773
/* Register the serial console */
774
774
775
775
uart_register ("/dev/console" , & CONSOLE_DEV );
776
- #endif
777
-
778
776
uart_register ("/dev/ttyS0" , & TTYS0_DEV );
779
777
minor = 1 ;
778
+ #endif
780
779
781
780
/* Register all remaining UARTs */
782
781
@@ -786,7 +785,7 @@ void arm_serialinit(void)
786
785
{
787
786
/* Don't create a device for non-configured ports. */
788
787
789
- if (g_uart_devs [i ] == 0 )
788
+ if (g_uart_devs [i ] == NULL )
790
789
{
791
790
continue ;
792
791
}
You can’t perform that action at this time.
0 commit comments