Skip to content

Commit 7223a1d

Browse files
anchaoxiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent ff2fe98 commit 7223a1d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/serial/uart_16550.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include <nuttx/serial/serial.h>
4343
#include <nuttx/fs/ioctl.h>
4444
#include <nuttx/serial/uart_16550.h>
45-
#include <nuttx/spinlock.h>
4645

4746
#include <arch/board/board.h>
4847

@@ -1696,12 +1695,8 @@ static bool u16550_txempty(struct uart_dev_s *dev)
16961695
#ifdef HAVE_16550_CONSOLE
16971696
static void u16550_putc(FAR struct u16550_s *priv, int ch)
16981697
{
1699-
irqstate_t flags;
1700-
1701-
flags = spin_lock_irqsave(NULL);
17021698
while ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRE) == 0);
17031699
u16550_serialout(priv, UART_THR_OFFSET, (uart_datawidth_t)ch);
1704-
spin_unlock_irqrestore(NULL, flags);
17051700
}
17061701
#endif
17071702

0 commit comments

Comments
 (0)