Skip to content
Permalink
Browse files

drivers/uart_rv32m1_lpuart: Fix DT define usage

The driver was using a mix of instance defines and alias, move to just
using the alias defines so its consistent.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak authored and nashif committed Jun 14, 2019
1 parent d4a0c3a commit dca8a62afa86becfbd7d9f5b6d26fcf149dfbd93
Showing with 8 additions and 8 deletions.
  1. +8 −8 drivers/serial/uart_rv32m1_lpuart.c
@@ -326,10 +326,10 @@ DEVICE_AND_API_INIT(uart_0, DT_OPENISA_RV32M1_LPUART_UART_0_LABEL,
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
static void rv32m1_lpuart_config_func_0(struct device *dev)
{
IRQ_CONNECT(DT_INST_0_OPENISA_RV32M1_LPUART_IRQ_0, DT_INST_0_OPENISA_RV32M1_LPUART_IRQ_0_PRI, rv32m1_lpuart_isr,
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_UART_0_IRQ, DT_OPENISA_RV32M1_LPUART_UART_0_IRQ_PRI, rv32m1_lpuart_isr,
DEVICE_GET(uart_0), 0);

irq_enable(DT_INST_0_OPENISA_RV32M1_LPUART_IRQ_0);
irq_enable(DT_OPENISA_RV32M1_LPUART_UART_0_IRQ);
}
#endif

@@ -367,10 +367,10 @@ DEVICE_AND_API_INIT(uart_1, DT_OPENISA_RV32M1_LPUART_UART_1_LABEL,
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
static void rv32m1_lpuart_config_func_1(struct device *dev)
{
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_1_IRQ_0, DT_OPENISA_RV32M1_LPUART_1_IRQ_0_PRI, rv32m1_lpuart_isr,
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_UART_1_IRQ, DT_OPENISA_RV32M1_LPUART_UART_1_IRQ_PRI, rv32m1_lpuart_isr,
DEVICE_GET(uart_1), 0);

irq_enable(DT_OPENISA_RV32M1_LPUART_1_IRQ_0);
irq_enable(DT_OPENISA_RV32M1_LPUART_UART_1_IRQ);
}
#endif

@@ -408,10 +408,10 @@ DEVICE_AND_API_INIT(uart_2, DT_OPENISA_RV32M1_LPUART_UART_2_LABEL,
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
static void rv32m1_lpuart_config_func_2(struct device *dev)
{
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_2_IRQ_0, DT_OPENISA_RV32M1_LPUART_2_IRQ_0_PRI, rv32m1_lpuart_isr,
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_UART_2_IRQ, DT_OPENISA_RV32M1_LPUART_UART_2_IRQ_PRI, rv32m1_lpuart_isr,
DEVICE_GET(uart_2), 0);

irq_enable(DT_OPENISA_RV32M1_LPUART_2_IRQ_0);
irq_enable(DT_OPENISA_RV32M1_LPUART_UART_2_IRQ);
}
#endif

@@ -449,10 +449,10 @@ DEVICE_AND_API_INIT(uart_3, DT_OPENISA_RV32M1_LPUART_3_LABEL,
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
static void rv32m1_lpuart_config_func_3(struct device *dev)
{
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_3_IRQ_0, DT_OPENISA_RV32M1_LPUART_3_IRQ_0_PRI, rv32m1_lpuart_isr,
IRQ_CONNECT(DT_OPENISA_RV32M1_LPUART_UART_3_IRQ, DT_OPENISA_RV32M1_LPUART_UART_3_IRQ_PRI, rv32m1_lpuart_isr,
DEVICE_GET(uart_3), 0);

irq_enable(DT_OPENISA_RV32M1_LPUART_3_IRQ_0);
irq_enable(DT_OPENISA_RV32M1_LPUART_UART_3_IRQ);
}
#endif

0 comments on commit dca8a62

Please sign in to comment.
You can’t perform that action at this time.