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>
This commit is contained in:
Peter Hurley 2015-02-24 14:25:15 -05:00 committed by Greg Kroah-Hartman
parent 4037539370
commit 72a33aad47
1 changed files with 1 additions and 1 deletions

View File

@ -3053,7 +3053,7 @@ serial8250_type(struct uart_port *port)
return uart_config[type].name; return uart_config[type].name;
} }
static struct uart_ops serial8250_pops = { static const struct uart_ops serial8250_pops = {
.tx_empty = serial8250_tx_empty, .tx_empty = serial8250_tx_empty,
.set_mctrl = serial8250_set_mctrl, .set_mctrl = serial8250_set_mctrl,
.get_mctrl = serial8250_get_mctrl, .get_mctrl = serial8250_get_mctrl,