]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
serial: 8250: Declare base port operations const
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 24 Feb 2015 19:25:15 +0000 (14:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 17:18:54 +0000 (18:18 +0100)
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>
drivers/tty/serial/8250/8250_core.c

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