summaryrefslogtreecommitdiffstats
path: root/drivers/char/mxser_new.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-30 01:47:34 +0100
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 19:55:55 +0100
commit31f87cf48d54f5930e6e8e827989c18b0069c94a (patch)
tree7a9c9892a934aa41cd68bc3006500ed7d9a9efc3 /drivers/char/mxser_new.c
parent[PATCH] pci/probe: fix macro that confuses kernel-doc (diff)
downloadlinux-31f87cf48d54f5930e6e8e827989c18b0069c94a.tar.xz
linux-31f87cf48d54f5930e6e8e827989c18b0069c94a.zip
[PATCH] Char: mxser, fix oops when removing opened
tty_driver->owner is not set, so if somebody remove mxser_module, it might oops (and doesn't tell the user: no way, it's in use). Set the .owner value. Cc: <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/mxser_new.c')
-rw-r--r--drivers/char/mxser_new.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index cd989dce7c53..1bb030b3a51a 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -2690,6 +2690,7 @@ static int __init mxser_module_init(void)
MXSER_VERSION);
/* Initialize the tty_driver structure */
+ mxvar_sdriver->owner = THIS_MODULE;
mxvar_sdriver->magic = TTY_DRIVER_MAGIC;
mxvar_sdriver->name = "ttyMI";
mxvar_sdriver->major = ttymajor;