Commit 04b757df authored by Aya Mahfouz's avatar Aya Mahfouz Committed by Greg Kroah-Hartman

tty: constify tty_port_operations structs

Constifies tty_port_operations structures in
the tty driver since they are not modified
after their initialization.

Detected and found using Coccinelle.
Suggested-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b95d95d
...@@ -162,7 +162,7 @@ static int goldfish_tty_console_setup(struct console *co, char *options) ...@@ -162,7 +162,7 @@ static int goldfish_tty_console_setup(struct console *co, char *options)
return 0; return 0;
} }
static struct tty_port_operations goldfish_port_ops = { static const struct tty_port_operations goldfish_port_ops = {
.activate = goldfish_tty_activate, .activate = goldfish_tty_activate,
.shutdown = goldfish_tty_shutdown .shutdown = goldfish_tty_shutdown
}; };
......
...@@ -2336,7 +2336,7 @@ static const struct tty_operations mxser_ops = { ...@@ -2336,7 +2336,7 @@ static const struct tty_operations mxser_ops = {
.get_icount = mxser_get_icount, .get_icount = mxser_get_icount,
}; };
static struct tty_port_operations mxser_port_ops = { static const struct tty_port_operations mxser_port_ops = {
.carrier_raised = mxser_carrier_raised, .carrier_raised = mxser_carrier_raised,
.dtr_rts = mxser_dtr_rts, .dtr_rts = mxser_dtr_rts,
.activate = mxser_activate, .activate = mxser_activate,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment