diff --git a/arch/arm/src/efm32/efm32_leserial.c b/arch/arm/src/efm32/efm32_leserial.c index 560591923175b..be4af95dee476 100644 --- a/arch/arm/src/efm32/efm32_leserial.c +++ b/arch/arm/src/efm32/efm32_leserial.c @@ -326,7 +326,7 @@ static void efm32_restoreuartint(struct efm32_leuart_s *priv, uint32_t ien) */ flags = spin_lock_irqsave(&priv->lock); - efm32_restoreuartint_nolock(priv, len); + efm32_restoreuartint_nolock(priv, ien); spin_unlock_irqrestore(&priv->lock, flags); } diff --git a/arch/arm/src/gd32f4/gd32f4xx_serial.c b/arch/arm/src/gd32f4/gd32f4xx_serial.c index ad903b6c7a59d..bdd5a822f66f2 100644 --- a/arch/arm/src/gd32f4/gd32f4xx_serial.c +++ b/arch/arm/src/gd32f4/gd32f4xx_serial.c @@ -131,7 +131,6 @@ struct up_dev_s uint8_t stop_2bits; /* True: Configure with 2 stop bits instead of 1 */ uint32_t tx_gpio; /* USART TX GPIO pin configuration */ uint32_t rx_gpio; /* USART RX GPIO pin configuration */ - spinlock_t lock; /* Spinlock */ # ifdef CONFIG_SERIAL_IFLOWCONTROL uint32_t rts_gpio; /* UART RTS GPIO pin configuration */ @@ -171,6 +170,7 @@ struct up_dev_s uint32_t ie; /* USART enabled interrupts */ uint16_t sr; /* Save USART status */ + spinlock_t lock; /* Spinlock */ /* TX DMA state */ diff --git a/arch/arm/src/imxrt/imxrt_edma.c b/arch/arm/src/imxrt/imxrt_edma.c index 1a839ce196c83..b1413dece136a 100644 --- a/arch/arm/src/imxrt/imxrt_edma.c +++ b/arch/arm/src/imxrt/imxrt_edma.c @@ -137,6 +137,7 @@ struct imxrt_edma_s /* These mutex protect the DMA channel and descriptor tables */ mutex_t chlock; /* Protects channel table */ + spinlock_t lock; #if CONFIG_IMXRT_EDMA_NTCD > 0 sem_t dsem; /* Supports wait for free descriptors */ #endif @@ -1207,7 +1208,6 @@ int imxrt_dmach_start(DMACH_HANDLE handle, edma_callback_t callback, void imxrt_dmach_stop(DMACH_HANDLE handle) { struct imxrt_dmach_s *dmach = (struct imxrt_dmach_s *)handle; - irqstate_t flags; dmainfo("dmach: %p\n", dmach); DEBUGASSERT(dmach != NULL); diff --git a/arch/arm/src/stm32u5/stm32_serial.c b/arch/arm/src/stm32u5/stm32_serial.c index 5d009a3c3b0c9..810e4d1844cd4 100644 --- a/arch/arm/src/stm32u5/stm32_serial.c +++ b/arch/arm/src/stm32u5/stm32_serial.c @@ -561,7 +561,7 @@ static struct stm32_serial_s g_usart1priv = .rs485_dir_polarity = true, # endif # endif - .lock = = SP_UNLOCKED, + .lock = SP_UNLOCKED, }; #endif