summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2003-03-15 10:37:42 +0000
committerLinus Torvalds <torvalds@home.transmeta.com>2003-03-15 10:37:42 +0000
commitc4ab9d7892e7f3bf3698f514c8db8f5e719f2b66 (patch)
tree9da20c6d9be7fcffadc9cee8343366ea82770f66
parent0ba2db65cc731f045acd51a16e2ed3786a6292d4 (diff)
[TTY] Register tty devclass before use.
Register the tty devclass with sysfs before tty drivers initialise - sysfs requires structures to be registered before use. This is required for the previous serial csets, as well as any drivers which are initialising using __initcall() or module_init().
-rw-r--r--drivers/char/tty_io.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 32488d71037f..86e3216d0547 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2235,14 +2235,19 @@ struct device_class tty_devclass = {
};
EXPORT_SYMBOL(tty_devclass);
+static int __init tty_devclass_init(void)
+{
+ return devclass_register(&tty_devclass);
+}
+
+postcore_initcall(tty_devclass_init);
+
/*
* Ok, now we can initialize the rest of the tty devices and can count
* on memory allocations, interrupts etc..
*/
void __init tty_init(void)
{
- devclass_register(&tty_devclass);
-
/*
* dev_tty_driver and dev_console_driver are actually magic
* devices which get redirected at open time. Nevertheless,