diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-03-08 02:00:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-18 15:13:56 +0300 |
commit | a6cee01b4f9205ce664e3442ee7bd5aee0d650de (patch) | |
tree | 56334785132eaef958f2804ee725d8678ff31a98 /drivers/tty/serial | |
parent | 988c7c00691008ea1daaa1235680a0da49dab4e8 (diff) | |
download | linux-a6cee01b4f9205ce664e3442ee7bd5aee0d650de.tar.xz |
serial: 8250_mtk: make two read-only arrays static const
Don't populate the read-only arrays fraction_L_mapping and
fraction_M_mapping on the stack but instead make them static
const. Also makes the object code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220307230055.168241-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/8250/8250_mtk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index fb65dc601b23..f4a0caa56f84 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -289,10 +289,10 @@ static void mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermios *old) { - unsigned short fraction_L_mapping[] = { + static const unsigned short fraction_L_mapping[] = { 0, 1, 0x5, 0x15, 0x55, 0x57, 0x57, 0x77, 0x7F, 0xFF, 0xFF }; - unsigned short fraction_M_mapping[] = { + static const unsigned short fraction_M_mapping[] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3 }; struct uart_8250_port *up = up_to_u8250p(port); |