tty: n_tty, set tty_ldisc_ops::owner
authorJiri Slaby <jslaby@suse.cz>
Tue, 2 Mar 2021 06:21:39 +0000 (07:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:34:06 +0000 (09:34 +0100)
Set tty_ldisc_ops::owner to THIS_MODULE. This has no effect currently as
n_tty cannot be built as a module. If someone ever tries to modularize
tty, we wouldn't manage module's reference count as in other ldiscs. So
fix this just in case.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210302062214.29627-9-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c

index 7c53185bce5762e8c647e3d139fbcae17de17b2b..a6f3c5c148ebf7177b3b2f5b7352a192a72b0281 100644 (file)
@@ -2488,6 +2488,7 @@ static int n_tty_ioctl(struct tty_struct *tty, struct file *file,
 }
 
 static struct tty_ldisc_ops n_tty_ops = {
+       .owner           = THIS_MODULE,
        .name            = "n_tty",
        .open            = n_tty_open,
        .close           = n_tty_close,