From 744e1dc69278e9687e29a1fac4deac6317ba7d40 Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Mon, 9 Aug 2021 16:32:57 +0200 Subject: [PATCH] drivers: serial: stm32 uart defines dma slot with macro The STM32_DMA_SLOT macro from include/drivers/dma/dma_stm32.h must be used here, especially for dma of type v2bis. In this case, the dma-cell is not defined and slot is null. Signed-off-by: Francois Ramu --- drivers/serial/uart_stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index 705e6d8fa4c..487de2c0703 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -1462,7 +1462,7 @@ static int uart_stm32_pm_control(const struct device *dev, .dma_dev = DEVICE_DT_GET(STM32_DMA_CTLR(index, dir)), \ .dma_channel = DT_INST_DMAS_CELL_BY_NAME(index, dir, channel), \ .dma_cfg = { \ - .dma_slot = DT_INST_DMAS_CELL_BY_NAME(index, dir, slot),\ + .dma_slot = STM32_DMA_SLOT(index, dir, slot),\ .channel_direction = STM32_DMA_CONFIG_DIRECTION( \ STM32_DMA_CHANNEL_CONFIG(index, dir)),\ .channel_priority = STM32_DMA_CONFIG_PRIORITY( \