summaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_console.c
diff options
context:
space:
mode:
authorAnton Blanchard2005-09-14 23:19:18 +0200
committerLinus Torvalds2005-09-14 23:34:17 +0200
commitef4cbee0b0d0f791bb593f99b702410f3c0efce6 (patch)
tree9c7d2271f4af6985ffb6952fe43ddcf4d6d9b1d6 /drivers/char/hvc_console.c
parent[PATCH] add PCI IDs so RME32 and RME96 drivers build (diff)
downloadkernel-qcow2-linux-ef4cbee0b0d0f791bb593f99b702410f3c0efce6.tar.gz
kernel-qcow2-linux-ef4cbee0b0d0f791bb593f99b702410f3c0efce6.tar.xz
kernel-qcow2-linux-ef4cbee0b0d0f791bb593f99b702410f3c0efce6.zip
[PATCH] hvc_console: start kernel thread before registering tty
Its possible that we can write to the hvc_console tty as soon it is registered. Recently this started happening due to (what looks like) a change to the hotplug code. Unfortunately at this stage we have not started the khvcd kernel thread and oops. The solution is to start the kernel thread before registering the tty. Signed-off-by: Anton Blanchard <anton@samba.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r--drivers/char/hvc_console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index cddb789902db..f92177634677 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -839,9 +839,6 @@ int __init hvc_init(void)
hvc_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(hvc_driver, &hvc_ops);
- if (tty_register_driver(hvc_driver))
- panic("Couldn't register hvc console driver\n");
-
/* Always start the kthread because there can be hotplug vty adapters
* added later. */
hvc_task = kthread_run(khvcd, NULL, "khvcd");
@@ -851,6 +848,9 @@ int __init hvc_init(void)
return -EIO;
}
+ if (tty_register_driver(hvc_driver))
+ panic("Couldn't register hvc console driver\n");
+
return 0;
}
module_init(hvc_init);