From: Rikard Falkeborn Date: Wed, 4 Nov 2020 23:51:34 +0000 (+0100) Subject: tty: serial: msm_serial: Constify msm_uart_pops X-Git-Tag: v5.15~2219^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d66442dfdbd45019c60bb6aeaf2d5eb45534606;p=platform%2Fkernel%2Flinux-starfive.git tty: serial: msm_serial: Constify msm_uart_pops The only usage of msm_uart_pops is to assign its address to the ops field in the uart_port struct, which is a pointer to const. Make it const to allow the compiler to put it in read-only memory. Reviewed-by: Jeffrey Hugo Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201104235134.17793-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index ec31a80..770c182 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -1524,7 +1524,7 @@ static void msm_poll_put_char(struct uart_port *port, unsigned char c) } #endif -static struct uart_ops msm_uart_pops = { +static const struct uart_ops msm_uart_pops = { .tx_empty = msm_tx_empty, .set_mctrl = msm_set_mctrl, .get_mctrl = msm_get_mctrl,