diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 51e0d32883ba7d3bbb5b626dcb6314a49d210dff..a23fa5ed1d67f02dc269750f1d520d93ce009670 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -800,7 +800,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
 	return retval;
 }
 
-static struct file_operations ptmx_fops;
+static struct file_operations ptmx_fops __ro_after_init;
 
 static void __init unix98_pty_init(void)
 {