From 8128a726a4f1e67cb8bed0da63d3a78a1bed466e Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Tue, 14 Nov 2023 19:28:59 +0100 Subject: [PATCH] modem: backend: uart_async: Remove UART flush The UART flush is not relevant for the async UART implementation. UART drivers should handle this internally. Signed-off-by: Bjarki Arge Andreasen --- subsys/modem/backends/modem_backend_uart_async.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/subsys/modem/backends/modem_backend_uart_async.c b/subsys/modem/backends/modem_backend_uart_async.c index 7c59a749e2..bd18edbd2f 100644 --- a/subsys/modem/backends/modem_backend_uart_async.c +++ b/subsys/modem/backends/modem_backend_uart_async.c @@ -17,15 +17,6 @@ LOG_MODULE_DECLARE(modem_backend_uart); #define MODEM_BACKEND_UART_ASYNC_STATE_RX_BUF0_USED_BIT (2) #define MODEM_BACKEND_UART_ASYNC_STATE_RX_BUF1_USED_BIT (3) -static void modem_backend_uart_async_flush(struct modem_backend_uart *backend) -{ - uint8_t c; - - while (uart_fifo_read(backend->uart, &c, 1) > 0) { - continue; - } -} - static bool modem_backend_uart_async_is_closed(struct modem_backend_uart *backend) { if (!atomic_test_bit(&backend->async.state, @@ -142,7 +133,6 @@ static int modem_backend_uart_async_open(void *data) int ret; atomic_set(&backend->async.state, 0); - modem_backend_uart_async_flush(backend); ring_buf_reset(&backend->async.receive_rb); /* Reserve receive buffer 0 */