init: Simplify code for array of UART devices

Gets rid of obsolete #ifdefs, since the name of a UART device's
associated variable is now constant regardless of when it is
initialized.

Change-Id: Ic6b5ce7777f067fb57aee33899a644c63040d41f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-10-14 09:28:23 -04:00 committed by Anas Nashif
commit acd9ffe5fb
3 changed files with 0 additions and 36 deletions

View file

@ -144,20 +144,8 @@ pre_kernel_late_init(ns16550_uart1, &ns16550_uart_dev_data[1]);
/**< UART Devices */
struct device * const uart_devs[] = {
#if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 0))
&__initconfig_ns16550_uart0,
#else
&__initconfig_ns16550_uart0,
#endif /* CONFIG_EARLY_CONSOLE */
#if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 1))
&__initconfig_ns16550_uart1,
#else
&__initconfig_ns16550_uart1,
#endif /* CONFIG_EARLY_CONSOLE */
};
#endif

View file

@ -131,20 +131,8 @@ pre_kernel_early_init(ns16550_uart1, &ns16550_uart_dev_data[1]);
/**< UART Devices */
struct device * const uart_devs[] = {
#if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 0))
&__initconfig_ns16550_uart0,
#else
&__initconfig_ns16550_uart0,
#endif /* CONFIG_EARLY_CONSOLE */
#if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 1))
&__initconfig_ns16550_uart1,
#else
&__initconfig_ns16550_uart1,
#endif /* CONFIG_EARLY_CONSOLE */
};
#endif

View file

@ -144,20 +144,8 @@ pre_kernel_late_init(ns16550_uart1, &ns16550_uart_dev_data[1]);
/**< UART Devices */
struct device * const uart_devs[] = {
#if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 0))
&__initconfig_ns16550_uart0,
#else
&__initconfig_ns16550_uart0,
#endif /* CONFIG_EARLY_CONSOLE */
#if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 1))
&__initconfig_ns16550_uart1,
#else
&__initconfig_ns16550_uart1,
#endif /* CONFIG_EARLY_CONSOLE */
};
#endif