init: Simplify symbol name generated by DECLARE_DEVICE_INIT_CONFIG()

Gets rid of the trailing initialization level character from the
name of the device variable generated by the macro, since it serves
no useful purpose. (The linker scripts place the various initialization
sections in ascending order based on the name of the section, so there
is no need to embed the initialization level in the variable name itself.)

Change-Id: I56bb79a513b8f77fb1f3fbaccec14454c2520772
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-10-14 09:17:38 -04:00 committed by Anas Nashif
commit 7b006066a4
10 changed files with 28 additions and 28 deletions

View file

@ -215,11 +215,11 @@ pre_kernel_late_init(k20_uart4, &k20_uart_dev_data[4]);
/**< UART Devices */ /**< UART Devices */
struct device * const uart_devs[] = { struct device * const uart_devs[] = {
&__initconfig_k20_uart02, &__initconfig_k20_uart0,
&__initconfig_k20_uart12, &__initconfig_k20_uart1,
&__initconfig_k20_uart22, &__initconfig_k20_uart2,
&__initconfig_k20_uart32, &__initconfig_k20_uart3,
&__initconfig_k20_uart42, &__initconfig_k20_uart4,
}; };
#endif /* CONFIG_K20_UART */ #endif /* CONFIG_K20_UART */

View file

@ -203,9 +203,9 @@ pre_kernel_late_init(stellaris_uart2, NULL);
/**< UART Devices */ /**< UART Devices */
struct device * const uart_devs[] = { struct device * const uart_devs[] = {
&__initconfig_stellaris_uart02, &__initconfig_stellaris_uart0,
&__initconfig_stellaris_uart12, &__initconfig_stellaris_uart1,
&__initconfig_stellaris_uart22, &__initconfig_stellaris_uart2,
}; };
#endif /* CONFIG_STELLARIS_UART */ #endif /* CONFIG_STELLARIS_UART */

View file

@ -147,16 +147,16 @@ struct device * const uart_devs[] = {
#if (defined(CONFIG_EARLY_CONSOLE) && \ #if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \ defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 0)) (CONFIG_UART_CONSOLE_INDEX == 0))
&__initconfig_ns16550_uart01, &__initconfig_ns16550_uart0,
#else #else
&__initconfig_ns16550_uart02, &__initconfig_ns16550_uart0,
#endif /* CONFIG_EARLY_CONSOLE */ #endif /* CONFIG_EARLY_CONSOLE */
#if (defined(CONFIG_EARLY_CONSOLE) && \ #if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \ defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 1)) (CONFIG_UART_CONSOLE_INDEX == 1))
&__initconfig_ns16550_uart11, &__initconfig_ns16550_uart1,
#else #else
&__initconfig_ns16550_uart12, &__initconfig_ns16550_uart1,
#endif /* CONFIG_EARLY_CONSOLE */ #endif /* CONFIG_EARLY_CONSOLE */
}; };

View file

@ -134,16 +134,16 @@ struct device * const uart_devs[] = {
#if (defined(CONFIG_EARLY_CONSOLE) && \ #if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \ defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 0)) (CONFIG_UART_CONSOLE_INDEX == 0))
&__initconfig_ns16550_uart00, &__initconfig_ns16550_uart0,
#else #else
&__initconfig_ns16550_uart01, &__initconfig_ns16550_uart0,
#endif /* CONFIG_EARLY_CONSOLE */ #endif /* CONFIG_EARLY_CONSOLE */
#if (defined(CONFIG_EARLY_CONSOLE) && \ #if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \ defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 1)) (CONFIG_UART_CONSOLE_INDEX == 1))
&__initconfig_ns16550_uart10, &__initconfig_ns16550_uart1,
#else #else
&__initconfig_ns16550_uart11, &__initconfig_ns16550_uart1,
#endif /* CONFIG_EARLY_CONSOLE */ #endif /* CONFIG_EARLY_CONSOLE */
}; };

View file

@ -147,16 +147,16 @@ struct device * const uart_devs[] = {
#if (defined(CONFIG_EARLY_CONSOLE) && \ #if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \ defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 0)) (CONFIG_UART_CONSOLE_INDEX == 0))
&__initconfig_ns16550_uart01, &__initconfig_ns16550_uart0,
#else #else
&__initconfig_ns16550_uart02, &__initconfig_ns16550_uart0,
#endif /* CONFIG_EARLY_CONSOLE */ #endif /* CONFIG_EARLY_CONSOLE */
#if (defined(CONFIG_EARLY_CONSOLE) && \ #if (defined(CONFIG_EARLY_CONSOLE) && \
defined(CONFIG_UART_CONSOLE) && \ defined(CONFIG_UART_CONSOLE) && \
(CONFIG_UART_CONSOLE_INDEX == 1)) (CONFIG_UART_CONSOLE_INDEX == 1))
&__initconfig_ns16550_uart11, &__initconfig_ns16550_uart1,
#else #else
&__initconfig_ns16550_uart12, &__initconfig_ns16550_uart1,
#endif /* CONFIG_EARLY_CONSOLE */ #endif /* CONFIG_EARLY_CONSOLE */
}; };

View file

@ -390,7 +390,7 @@ void gpio_config_0_irq(struct device *port)
#ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT #ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT
void gpio_dw_isr_0(void *unused) void gpio_dw_isr_0(void *unused)
{ {
gpio_dw_isr(&__initconfig_gpio_02); gpio_dw_isr(&__initconfig_gpio_0);
} }
#endif /* CONFIG_GPIO_DW_0_IRQ_DIRECT */ #endif /* CONFIG_GPIO_DW_0_IRQ_DIRECT */
@ -453,7 +453,7 @@ void gpio_config_1_irq(struct device *port)
#ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT #ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT
void gpio_dw_isr_1(void *unused) void gpio_dw_isr_1(void *unused)
{ {
gpio_dw_isr(&__initconfig_gpio_12); gpio_dw_isr(&__initconfig_gpio_1);
} }
#endif #endif

View file

@ -867,7 +867,7 @@ void i2c_config_0(struct device *port)
#ifdef CONFIG_I2C_DW_0_IRQ_DIRECT #ifdef CONFIG_I2C_DW_0_IRQ_DIRECT
void i2c_dw_isr_0(void *unused) void i2c_dw_isr_0(void *unused)
{ {
i2c_dw_isr(&__initconfig_i2c_02); i2c_dw_isr(&__initconfig_i2c_0);
} }
#endif #endif

View file

@ -156,7 +156,7 @@ void shared_irq_config_0_irq(struct device *port)
void shared_irq_isr_0(void *unused) void shared_irq_isr_0(void *unused)
{ {
shared_irq_isr(&__initconfig_shared_irq_01); shared_irq_isr(&__initconfig_shared_irq_0);
} }
#endif /* CONFIG_SHARED_IRQ_0 */ #endif /* CONFIG_SHARED_IRQ_0 */
@ -188,7 +188,7 @@ void shared_irq_config_1_irq(struct device *port)
void shared_irq_isr_1(void *unused) void shared_irq_isr_1(void *unused)
{ {
shared_irq_isr(&__initconfig_shared_irq_11); shared_irq_isr(&__initconfig_shared_irq_1);
} }
#endif /* CONFIG_SHARED_IRQ_1 */ #endif /* CONFIG_SHARED_IRQ_1 */

View file

@ -453,7 +453,7 @@ nano_early_init(spi_intel_port_0, &spi_intel_data_port_0);
void spi_intel_isr_0(void *unused) void spi_intel_isr_0(void *unused)
{ {
spi_intel_isr(&__initconfig_spi_intel_port_03); spi_intel_isr(&__initconfig_spi_intel_port_0);
} }
IRQ_CONNECT_STATIC(spi_intel_irq_port_0, CONFIG_SPI_INTEL_PORT_0_IRQ, IRQ_CONNECT_STATIC(spi_intel_irq_port_0, CONFIG_SPI_INTEL_PORT_0_IRQ,
@ -496,7 +496,7 @@ pre_kernel_late_init(spi_intel_port_1, &spi_intel_data_port_1);
void spi_intel_isr_1(void *unused) void spi_intel_isr_1(void *unused)
{ {
spi_intel_isr(&__initconfig_spi_intel_port_12); spi_intel_isr(&__initconfig_spi_intel_port_1);
} }
IRQ_CONNECT_STATIC(spi_intel_irq_port_1, CONFIG_SPI_INTEL_PORT_1_IRQ, IRQ_CONNECT_STATIC(spi_intel_irq_port_1, CONFIG_SPI_INTEL_PORT_1_IRQ,

View file

@ -50,7 +50,7 @@
* @sa DECLARE_DEVICE_INIT_CONFIG() * @sa DECLARE_DEVICE_INIT_CONFIG()
*/ */
#define __define_initconfig(cfg_name, id, data) \ #define __define_initconfig(cfg_name, id, data) \
static struct device (__initconfig_##cfg_name##id) __used \ static struct device (__initconfig_##cfg_name) __used \
__attribute__((__section__(".initconfig" #id ".init"))) = { \ __attribute__((__section__(".initconfig" #id ".init"))) = { \
.config = &(config_##cfg_name),\ .config = &(config_##cfg_name),\
.driver_data = data} .driver_data = data}