serial: 8250: Use serial8250_do_set_termios for uartclk updating
authorSerge Semin <fancer.lancer@gmail.com>
Thu, 22 Feb 2024 14:50:56 +0000 (17:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Mar 2024 21:04:26 +0000 (22:04 +0100)
commit675c00eb70534042be06c497605e35aa44aae19b
tree42eb2b09458cebad6c44eeac9b85ad60f357560b
parent4e489a6e93e85726a41f85d1aaaab6f603ec2d33
serial: 8250: Use serial8250_do_set_termios for uartclk updating

The serial8250_update_uartclk() body was created based on the several
method calls copied from the serial8250_do_set_termios() function. Seeing
aside with some other things the later method can update the baud rate
based on the new reference clock let's just call it instead thus
simplifying the code a bit.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/linux-serial/ZczD7KPbeRnY4CFc@black.fi.intel.com
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240222145058.28307-1-fancer.lancer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c