Commit 01fd3c27 authored by Aya Mahfouz's avatar Aya Mahfouz Committed by David S. Miller

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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9bcfd78a
...@@ -168,17 +168,17 @@ struct sunhv_ops { ...@@ -168,17 +168,17 @@ struct sunhv_ops {
int (*receive_chars)(struct uart_port *port); 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, .transmit_chars = transmit_chars_putchar,
.receive_chars = receive_chars_getchar, .receive_chars = receive_chars_getchar,
}; };
static struct sunhv_ops bywrite_ops = { static const struct sunhv_ops bywrite_ops = {
.transmit_chars = transmit_chars_write, .transmit_chars = transmit_chars_write,
.receive_chars = receive_chars_read, .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) static struct tty_port *receive_chars(struct uart_port *port)
{ {
......
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