]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
serial: 8250_dw: Simplify the ref clock rate setting procedure
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Thu, 23 Jul 2020 00:33:55 +0000 (03:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 15:14:39 +0000 (17:14 +0200)
commit442fdef1b931181a45ce4fce68b7675f7a78ec3a
treee568205828b6dac71eab0cb9316c1095de5f2b70
parent868f3ee6e452bc2b89e68183a1700fcbbe0807b1
serial: 8250_dw: Simplify the ref clock rate setting procedure

Really instead of twice checking the clk_round_rate() return value
we could do it once, and if it isn't error the clock rate can be changed.
By doing so we decrease a number of ret-value tests and remove a weird
goto-based construction implemented in the dw8250_set_termios() method.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20200723003357.26897-3-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c