Skip to contentSkip to conversation

char: constify tty_port_operations structs

PATCH In review Aya Mahfouz 2 participants 2 messages Dec 14, 2015 – Dec 15, 2015 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/char/ttyprintk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ttyprintk.c +1 -1
index a15ce4e..b098d2d 100644
@@ -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;
 
Signature · 6 lines
2.4.3


-- 
Kind Regards,
Aya Saif El-yazal Mahfouz