From ca0f6573fd295523f7ca95c82009f16a529d9350 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Fri, 27 Dec 2024 09:06:06 +0800 Subject: [PATCH] fix compile error chip/efm32_leserial.c: In function 'efm32_restoreuartint': Error: chip/efm32_leserial.c:329:37: error: 'len' undeclared (first use in this function); did you mean 'ien'? 329 | efm32_restoreuartint_nolock(priv, len); | ^~~ | ien Signed-off-by: hujun5 --- arch/arm/src/efm32/efm32_leserial.c | 2 +- arch/arm/src/gd32f4/gd32f4xx_serial.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..3ce5cafc36ff9 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 */ @@ -159,6 +158,7 @@ struct up_dev_s const uint8_t stop_2bits; /* True: Configure with 2 stop bits instead of 1 */ const uint32_t tx_gpio; /* USART TX GPIO pin configuration */ const uint32_t rx_gpio; /* USART RX GPIO pin configuration */ + spinlock_t lock; /* Spinlock */ # ifdef CONFIG_SERIAL_IFLOWCONTROL const uint32_t rts_gpio; /* UART RTS GPIO pin configuration */