From c1a39f31b277edadcf712af772a708d8449d9c41 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Tue, 14 May 2024 10:17:01 +0200 Subject: [PATCH] driver: uart: native: fix stop_bits/databits mix Correct a trivial bug and doxygen documentation error in which data_bits was missused instead of stop_bits. Signed-off-by: Alberto Escolar Piedras Signed-off-by: Mateusz Grzywacz --- drivers/serial/uart_native_tty.c | 2 +- drivers/serial/uart_native_tty_bottom.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/uart_native_tty.c b/drivers/serial/uart_native_tty.c index 8eb51bff5b8..4f2acc50b34 100644 --- a/drivers/serial/uart_native_tty.c +++ b/drivers/serial/uart_native_tty.c @@ -90,7 +90,7 @@ static int native_tty_conv_to_bottom_cfg(struct native_tty_bottom_cfg *bottom_cf return -ENOTSUP; } - switch (cfg->data_bits) { + switch (cfg->stop_bits) { case UART_CFG_STOP_BITS_1: bottom_cfg->stop_bits = NTB_STOP_BITS_1; break; diff --git a/drivers/serial/uart_native_tty_bottom.c b/drivers/serial/uart_native_tty_bottom.c index cb8e4162a66..279ebca4100 100644 --- a/drivers/serial/uart_native_tty_bottom.c +++ b/drivers/serial/uart_native_tty_bottom.c @@ -144,7 +144,7 @@ static inline void native_tty_stop_bits_set(struct termios *ter, * @brief Set the number of data bits in the termios structure * * @param ter - * @param stop_bits + * @param data_bits * */ static inline void native_tty_data_bits_set(struct termios *ter,