diff mbox series

[v1,10/19] hid-ft260: uart: do not configure baud rate twice

Message ID 20240210215147.77629-11-michael.zaidman@gmail.com (mailing list archive)
State New
Delegated to: Jiri Kosina
Headers show
Series hid-ft260: Fixes for serial driver patch v4 | expand

Commit Message

Michael Zaidman Feb. 10, 2024, 9:51 p.m. UTC
The uart speed settings are configured twice per session:
the old settings - by the ft260_uart_port_activate() and the new -
by the ft260_uart_set_termios() routine. We do not need to configure
the old settings per tty session since they have already been sent
to the device in the probe and passed to the tty via termios in the
ft260_driver_init.

Removed their coonfiguration from the ft260_uart_port_activate routine.

Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
---
 drivers/hid/hid-ft260.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
index 6266e4f1100d..63839f02e9b5 100644
--- a/drivers/hid/hid-ft260.c
+++ b/drivers/hid/hid-ft260.c
@@ -1524,7 +1524,6 @@  static int ft260_uart_activate(struct tty_port *tport, struct tty_struct *tty)
 	kfifo_reset(&port->xmit_fifo);
 	spin_unlock(&port->write_lock);
 
-	ft260_uart_change_speed(port, &tty->termios, NULL);
 	clear_bit(TTY_IO_ERROR, &tty->flags);
 
 	/* Wake up the chip as early as possible to not miss incoming data */