From d9a8d5f2ee070601754d22d230b001ef55ddb705 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 20 Mar 2023 00:16:33 +0800 Subject: [PATCH] usb/cdcacm: Remove the process for tc_iflag, tc_oflag and tc_lflag since the common code in serial.c already handle them correctly: https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1556-L1601 Signed-off-by: Xiang Xiao --- drivers/usbdev/cdcacm.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 6df211a1ae..e096d3149b 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -2339,9 +2339,6 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* And update with flags from this layer */ - termiosp->c_iflag = serdev->tc_iflag; - termiosp->c_oflag = serdev->tc_oflag; - termiosp->c_lflag = serdev->tc_lflag; termiosp->c_cflag = ((priv->linecoding.parity != CDC_PARITY_NONE) ? PARENB : 0) | ((priv->linecoding.parity == CDC_PARITY_ODD) ? PARODD : 0) | @@ -2358,10 +2355,10 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) termiosp->c_cflag |= (priv->iflow) ? CRTS_IFLOW : 0; #endif - cfsetispeed(termiosp, (speed_t) priv->linecoding.baud[3] << 24 | - (speed_t) priv->linecoding.baud[2] << 16 | - (speed_t) priv->linecoding.baud[1] << 8 | - (speed_t) priv->linecoding.baud[0]); + cfsetispeed(termiosp, (speed_t) priv->linecoding.baud[3] << 24 | + (speed_t) priv->linecoding.baud[2] << 16 | + (speed_t) priv->linecoding.baud[1] << 8 | + (speed_t) priv->linecoding.baud[0]); } break; @@ -2380,10 +2377,6 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* Update the flags we keep at this layer */ - serdev->tc_iflag = termiosp->c_iflag; - serdev->tc_oflag = termiosp->c_oflag; - serdev->tc_lflag = termiosp->c_lflag; - #ifdef CONFIG_CDCACM_OFLOWCONTROL /* Handle changes to output flow control */