From 7223a1d0d4984f87ce747778e3893a5cca5519da Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 12 Sep 2024 13:04:19 +0800 Subject: [PATCH] serial/uart_16550: remove up_putc spinlock putc atomicity should be guaranteed by common code rather than add similar hack to lower half driver Signed-off-by: chao an --- drivers/serial/uart_16550.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/serial/uart_16550.c b/drivers/serial/uart_16550.c index 53609720d1..89822e06eb 100644 --- a/drivers/serial/uart_16550.c +++ b/drivers/serial/uart_16550.c @@ -42,7 +42,6 @@ #include #include #include -#include #include @@ -1696,12 +1695,8 @@ static bool u16550_txempty(struct uart_dev_s *dev) #ifdef HAVE_16550_CONSOLE static void u16550_putc(FAR struct u16550_s *priv, int ch) { - irqstate_t flags; - - flags = spin_lock_irqsave(NULL); while ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRE) == 0); u16550_serialout(priv, UART_THR_OFFSET, (uart_datawidth_t)ch); - spin_unlock_irqrestore(NULL, flags); } #endif