mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
serial: cpm_uart: Use get_baudrate() instead of uart_baudrate()
uart_baudrate() is just a trivial wrapper to get_baudrate().
Use get_baudrate() directly and remove assignment in if condition.
And also remove uart_clock() which is not used since
commit 0b2a2e5b77
("cpm_uart: Remove !CONFIG_PPC_CPM_NEW_BINDING
code")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/4d497386f576a3df768e44a04f9bb512e424c311.1691068700.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
42ac6998ec
commit
c2d6c1b4f0
2 changed files with 4 additions and 12 deletions
|
@ -36,14 +36,4 @@ extern immap_t __iomem *mpc8xx_immr;
|
||||||
#define immr_unmap(addr) do {} while (0)
|
#define immr_unmap(addr) do {} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int uart_baudrate(void)
|
|
||||||
{
|
|
||||||
return get_baudrate();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int uart_clock(void)
|
|
||||||
{
|
|
||||||
return ppc_proc_freq;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,10 +32,11 @@
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
|
|
||||||
|
#include <sysdev/fsl_soc.h>
|
||||||
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/delay.h>
|
#include <asm/delay.h>
|
||||||
#include <asm/fs_pd.h>
|
|
||||||
#include <asm/udbg.h>
|
#include <asm/udbg.h>
|
||||||
|
|
||||||
#include <linux/serial_core.h>
|
#include <linux/serial_core.h>
|
||||||
|
@ -1311,7 +1312,8 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
|
||||||
if (options) {
|
if (options) {
|
||||||
uart_parse_options(options, &baud, &parity, &bits, &flow);
|
uart_parse_options(options, &baud, &parity, &bits, &flow);
|
||||||
} else {
|
} else {
|
||||||
if ((baud = uart_baudrate()) == -1)
|
baud = get_baudrate();
|
||||||
|
if (baud == -1)
|
||||||
baud = 9600;
|
baud = 9600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue