]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
char: constify tty_port_operations structs
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Mon, 14 Dec 2015 23:50:19 +0000 (01:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 07:31:08 +0000 (23:31 -0800)
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>
drivers/char/ttyprintk.c

index a15ce4ef39cd97cbef47f5ca31579700ffb0e572..b098d2d0b7c4a7cb8470f4f3fe5d4c2c461a3f04 100644 (file)
@@ -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;