From: Aya Mahfouz Date: Mon, 14 Dec 2015 23:50:19 +0000 (+0200) Subject: char: constify tty_port_operations structs X-Git-Tag: next-20160210~21^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9b95d95d5eba5a077283423616b4ec3329d6ab00;p=karo-tx-linux.git 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 Signed-off-by: Aya Mahfouz Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- 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;