From 10fc305493d10076bb6d1ac8bee65e7a18fdc236 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Thu, 31 Oct 2024 10:34:18 +0200 Subject: [PATCH] arch/arm64/src/imx9/imx9_lpuart.c: Fix parity get in TCGETS This is a partial revert / fix for regression from 74c1dfb19 Signed-off-by: Jukka Laitinen --- arch/arm64/src/imx9/imx9_lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/src/imx9/imx9_lpuart.c b/arch/arm64/src/imx9/imx9_lpuart.c index 93dcb4f3e30e3..a8d442a458b07 100644 --- a/arch/arm64/src/imx9/imx9_lpuart.c +++ b/arch/arm64/src/imx9/imx9_lpuart.c @@ -1613,8 +1613,8 @@ static int imx9_ioctl(struct file *filep, int cmd, unsigned long arg) /* Return parity */ - termiosp->c_cflag = (!priv->parity ? PARENB : 0) | - (priv->parity ? PARODD : 0); + termiosp->c_cflag = ((priv->parity != 0) ? PARENB : 0) | + ((priv->parity == 1) ? PARODD : 0); /* Return stop bits */