diff options
| author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2015-12-14 18:53:36 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-07 02:31:08 -0500 |
| commit | 04b757dfd26cee24bc62ed815cd87efbf10ef2fc (patch) | |
| tree | 4e6501161f5997c42cfedc2849b4adb015d374f9 /drivers/tty | |
| parent | 9b95d95d5eba5a077283423616b4ec3329d6ab00 (diff) | |
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>
Diffstat (limited to 'drivers/tty')
| -rw-r--r-- | drivers/tty/goldfish.c | 2 | ||||
| -rw-r--r-- | drivers/tty/mxser.c | 2 |
2 files changed, 2 insertions, 2 deletions
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) | |||
| 162 | return 0; | 162 | return 0; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | static struct tty_port_operations goldfish_port_ops = { | 165 | static const struct tty_port_operations goldfish_port_ops = { |
| 166 | .activate = goldfish_tty_activate, | 166 | .activate = goldfish_tty_activate, |
| 167 | .shutdown = goldfish_tty_shutdown | 167 | .shutdown = goldfish_tty_shutdown |
| 168 | }; | 168 | }; |
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 = { | |||
| 2336 | .get_icount = mxser_get_icount, | 2336 | .get_icount = mxser_get_icount, |
| 2337 | }; | 2337 | }; |
| 2338 | 2338 | ||
| 2339 | static struct tty_port_operations mxser_port_ops = { | 2339 | static const struct tty_port_operations mxser_port_ops = { |
| 2340 | .carrier_raised = mxser_carrier_raised, | 2340 | .carrier_raised = mxser_carrier_raised, |
| 2341 | .dtr_rts = mxser_dtr_rts, | 2341 | .dtr_rts = mxser_dtr_rts, |
| 2342 | .activate = mxser_activate, | 2342 | .activate = mxser_activate, |
