summaryrefslogtreecommitdiff
path: root/drivers/char/ttyprintk.c
diff options
context:
space:
mode:
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>2015-12-15 02:50:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 10:31:08 +0300
commit9b95d95d5eba5a077283423616b4ec3329d6ab00 (patch)
tree8e6485f56b0c72b46c48fb1b3d0ffc7cf4a74d3a /drivers/char/ttyprintk.c
parent401879c57f01cbf2da204ad2e8db910525c6dbea (diff)
downloadlinux-9b95d95d5eba5a077283423616b4ec3329d6ab00.tar.xz
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;