From bf08b5f0eddbac33de167bf67c70a24e3a56f195 Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Thu, 17 Feb 2022 15:22:06 -0300 Subject: [PATCH] drivers: uart: esp32: fix driver initialization id number The select uart instance used in uart driver initialization won't work as expected because the index used was not correct. This fixes the macro call to use proper index value. Signed-off-by: Sylvio Alves --- drivers/serial/uart_esp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_esp32.c b/drivers/serial/uart_esp32.c index 4004e4271cd..54231e629ae 100644 --- a/drivers/serial/uart_esp32.c +++ b/drivers/serial/uart_esp32.c @@ -575,7 +575,7 @@ static struct uart_esp32_data uart_esp32_data_##idx = { \ }, \ .hal = { \ .dev = \ - (uart_dev_t *)DT_REG_ADDR(DT_NODELABEL(uart##idx)), \ + (uart_dev_t *)DT_INST_REG_ADDR(idx), \ }, \ }; \ \