]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
serial: core, move termios handling to uart_startup
authorJiri Slaby <jslaby@suse.cz>
Tue, 29 Mar 2011 22:10:55 +0000 (00:10 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:33 +0000 (15:05 -0700)
commitb218cdecace041cad6d46b1f5a4e57fb9976f598
tree15dd0e639bd2468a0bb5c8cf9b14680c24761c7a
parent2d9da2444b556ba2cfeaa2223f6247f5cc7b6803
serial: core, move termios handling to uart_startup

commit c7d7abff40c27f82fe78b1091ab3fad69b2546f9 upstream.

We should not fiddle with speed and cflags in .dtr_rts hook. Actually
we might not have tty at that moment already.

So move the console cflag copy and speed setup into uart_startup.
Actually the speed setup is already there, but we need to call it
unconditionally (uart_startup is called from uart_open with hw_init =
0).

This means we move uart_change_speed before dtr/rts setup in .dtr_rts.
But this should not matter as the setup should be called after
uart_change_speed anyway.
Before:                             After:
dtr/rts setup (dtr_rts)             uart_change_speed (startup)
uart_change_speed (update_termios)  dtr/rts setup (dtr_rts)
dtr/rts setup (update_termios)      dtr/rts setup (update_termios)

The second setup will dismiss with the next patch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/serial_core.c