Browse Source

char: constify tty_port_operations structs

Constifies tty_port_operations structure in
the char driver since it is not modified
after its initialization.

Detected and found using Coccinelle.

Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz 9 years ago
parent
commit
9b95d95d5e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/char/ttyprintk.c

+ 1 - 1
drivers/char/ttyprintk.c

@@ -171,7 +171,7 @@ static const struct tty_operations ttyprintk_ops = {
 	.ioctl = tpk_ioctl,
 };
 
-static struct tty_port_operations null_ops = { };
+static const struct tty_port_operations null_ops = { };
 
 static struct tty_driver *ttyprintk_driver;