diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2015-12-15 00:37:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-24 18:04:18 +0100 |
commit | 01fd3c2744540ae7554bf098a9615a8310c6fc13 (patch) | |
tree | 3dac2bda80377df59cb8fa486960a713daf71b10 | |
parent | sparc: Hook up userfaultfd system call (diff) | |
download | linux-01fd3c2744540ae7554bf098a9615a8310c6fc13.tar.xz linux-01fd3c2744540ae7554bf098a9615a8310c6fc13.zip |
tty: serial: constify sunhv_ops structs
Constifies sunhv_ops structures in tty's serial
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: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/tty/serial/sunhv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index 064031870ba0..f224e8a715d7 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c @@ -168,17 +168,17 @@ struct sunhv_ops { int (*receive_chars)(struct uart_port *port); }; -static struct sunhv_ops bychar_ops = { +static const struct sunhv_ops bychar_ops = { .transmit_chars = transmit_chars_putchar, .receive_chars = receive_chars_getchar, }; -static struct sunhv_ops bywrite_ops = { +static const struct sunhv_ops bywrite_ops = { .transmit_chars = transmit_chars_write, .receive_chars = receive_chars_read, }; -static struct sunhv_ops *sunhv_ops = &bychar_ops; +static const struct sunhv_ops *sunhv_ops = &bychar_ops; static struct tty_port *receive_chars(struct uart_port *port) { |