summaryrefslogtreecommitdiffstats
path: root/drivers/char/ttyprintk.c
diff options
context:
space:
mode:
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>2015-12-15 00:50:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 08:31:08 +0100
commit9b95d95d5eba5a077283423616b4ec3329d6ab00 (patch)
tree8e6485f56b0c72b46c48fb1b3d0ffc7cf4a74d3a /drivers/char/ttyprintk.c
parentnet: irda: Fix use-after-free in irtty_open() (diff)
downloadlinux-9b95d95d5eba5a077283423616b4ec3329d6ab00.tar.xz
linux-9b95d95d5eba5a077283423616b4ec3329d6ab00.zip
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>
Diffstat (limited to 'drivers/char/ttyprintk.c')
-rw-r--r--drivers/char/ttyprintk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index a15ce4ef39cd..b098d2d0b7c4 100644
--- a/drivers/char/ttyprintk.c
+++ b/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;