From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Date: Mon, 14 Dec 2015 23:53:36 +0000 (+0200)
Subject: tty: constify tty_port_operations structs
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=04b757dfd26cee24bc62ed815cd87efbf10ef2fc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

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: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c
index 0f82c0b146f6..752232c77503 100644
--- a/drivers/tty/goldfish.c
+++ b/drivers/tty/goldfish.c
@@ -162,7 +162,7 @@ static int goldfish_tty_console_setup(struct console *co, char *options)
 	return 0;
 }
 
-static struct tty_port_operations goldfish_port_ops = {
+static const struct tty_port_operations goldfish_port_ops = {
 	.activate = goldfish_tty_activate,
 	.shutdown = goldfish_tty_shutdown
 };
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 9a0791e523b5..2f12bb9f4336 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -2336,7 +2336,7 @@ static const struct tty_operations mxser_ops = {
 	.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,
 	.dtr_rts = mxser_dtr_rts,
 	.activate = mxser_activate,