aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-02-24 14:25:15 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 13:18:54 -0400
commit72a33aad476f9d4b1210dbf434f53eeea84909ab (patch)
tree89f5866075164c1d81be10c3f13f226887502b9f /drivers/tty/serial/8250
parent403753937020549e4bb0d8ef6e915f00a338a096 (diff)
serial: 8250: Declare base port operations const
The base port operations dispatch table should never be modified at runtime; the proper way to override base port operations is to dup the port operations, modify the copy, and point port->ops at the copy. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index a4ed84a4f8db..b9f452fcb1a5 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -3053,7 +3053,7 @@ serial8250_type(struct uart_port *port)
3053 return uart_config[type].name; 3053 return uart_config[type].name;
3054} 3054}
3055 3055
3056static struct uart_ops serial8250_pops = { 3056static const struct uart_ops serial8250_pops = {
3057 .tx_empty = serial8250_tx_empty, 3057 .tx_empty = serial8250_tx_empty,
3058 .set_mctrl = serial8250_set_mctrl, 3058 .set_mctrl = serial8250_set_mctrl,
3059 .get_mctrl = serial8250_get_mctrl, 3059 .get_mctrl = serial8250_get_mctrl,